I add the this libraries in my project before add this libraries my project build successfully but after add this libraries throw some error like this.this error come in android plz help me.
include ':react-native-pusher-push-notifications'
project(':react-native-pusher-push-notifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-pusher-push-notifications/android')
include ':app'
RNPusherPushNotificationsPackage to MainApplication.java:-
import com.b8ne.RNPusherPushNotifications.RNPusherPushNotificationsPackage;
// ...
@Override
protected List getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
packages.add(new RNPusherPushNotificationsPackage()); // << Make sure this line is here
return packages;
}
I add the this libraries in my project before add this libraries my project build successfully but after add this libraries throw some error like this.this error come in android plz help me.
my code is below:- android/build.gradle:-
buildscript { dependencies { classpath('com.google.gms:google-services:4.3.0') } }
android/app/build.gradle:- plugins { id('com.google.gms.google-services') }
dependencies { implementation 'com.google.firebase:firebase-messaging:20.0.0' implementation project(':react-native-pusher-push-notifications') implementation 'com.pusher:push-notifications-android:1.4.4' }
android/settings.gradle:-
include ':react-native-pusher-push-notifications' project(':react-native-pusher-push-notifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-pusher-push-notifications/android') include ':app'
RNPusherPushNotificationsPackage to MainApplication.java:-
import com.b8ne.RNPusherPushNotifications.RNPusherPushNotificationsPackage; // ... @Override protected List getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
packages.add(new RNPusherPushNotificationsPackage()); // << Make sure this line is here
return packages;
}