RNPushNotification tried to override RNPushNotification
See original GitHub issueWhy this happen ?
`package com.awesomefyp;
import android.app.Application; import android.util.Log;
import com.facebook.react.PackageList; import com.facebook.hermes.reactexecutor.HermesExecutorFactory; import com.facebook.react.bridge.JavaScriptExecutorFactory; import com.facebook.react.ReactApplication; import com.dieam.reactnativepushnotification.ReactNativePushNotificationPackage;
import io.invertase.firebase.auth.RNFirebaseAuthPackage; import io.invertase.firebase.firestore.RNFirebaseFirestorePackage; import io.invertase.firebase.functions.RNFirebaseFunctionsPackage; //import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;
import com.dieam.reactnativepushnotification.ReactNativePushNotificationPackage; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.soloader.SoLoader;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> 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 RNFirebaseAuthPackage());
packages.add(new RNFirebaseFirestorePackage());
packages.add(new RNFirebaseFunctionsPackage());
// packages.add(new RNFirebaseMessagingPackage());
packages.add(new ReactNativePushNotificationPackage());
return packages;
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
} `
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Hey, probably, autolinking is enough, so you can just remove this line: packages.add(new ReactNativePushNotificationPackage());
Hi @sudhiryadav
Yes, it’s explained in the CHANGELOG.
Regards