I am very new to React-Native, developing my first React-native App. Previously it was working fine but then i installed a library then i faced the below error
java.lang.RuntimeException: Unable to load script from assets 'index.android.bundle'. Make sure your bundle is packaged correctly or you're running a packager server. .
Then i found this answer for the same issue. so i run command
react-native bundle --platform android --dev false --entry-file App.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
It resolve the first error but then i face second(below) error.
E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
Process: com.nickinaturizer, PID: 18969
com.facebook.react.common.JavascriptException: Module AppRegistry is not a registered callable module (calling runApplication), stack:
value@23:3036
<unknown>@23:911
value@23:2606
value@23:883
at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:56)
at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:40)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:374)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:148)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194)
at java.lang.Thread.run(Thread.java:818)
So i am having two questions regarding these error.
1. What is the use of index.android.bundle
file when my project is running fine before.
2. Is there any quick fix for those both error.
I am using react-native version: 0.51.0