SolvedNativeBase KitchenSink Native module CodePushNativeModule tried to override CodePushNativeModule for module name CodePush.

When I try to run NativeBase in AVD I get the following error at runtime.

java.lang.IllegalStateException: Native module CodePushNativeModule tried to override CodePushNativeModule for module name CodePush. If this was your intention, set canOverrideExistingModule=true at com.facebook.react.cxxbridge.NativeModuleRegistry.<init>(NativeModuleRegistry.java:53) at com.facebook.react.XReactInstanceManagerImpl.createReactContext(XReactInstanceManagerImpl.java:894) at com.facebook.react.XReactInstanceManagerImpl.access$600(XReactInstanceManagerImpl.java:110) at com.facebook.react.XReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(XReactInstanceManagerImpl.java:214) at com.facebook.react.XReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(XReactInstanceManagerImpl.java:193) at android.os.AsyncTask$2.call(AsyncTask.java:304) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761)

17 Answers

✔️Accepted Answer

@TheRealJAG
The error may be because of CodePush linked twice.
If yes, edit MainApplication.java to remove multiple instances of CodePush
And then it should be up and running

More Issues: