7

i am having problem with react-native in Android (Could not get BatchedBridge, make sure your bundle is packaged correctly ) [![enter image description here][1]][1]

i tried everything : update npm , react-native ,react and all dependencies in package.json to last versions , i removed node_modules and reinstall it again , clear cache ... atc

error log

 04-25 03:35:49.874 11688-11814/com.test.store E/AndroidRuntime: FATAL EXCEPTION: mqt_js
                                                            Process: com.test.store, PID: 11688
                                                            java.lang.RuntimeException: com.facebook.react.devsupport.JSException: Could not get BatchedBridge, make sure your bundle is packaged correctly
                                                                at com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler.handleException(DefaultNativeModuleCallExceptionHandler.java:24)
                                                                at com.facebook.react.devsupport.DisabledDevSupportManager.handleException(DisabledDevSupportManager.java:161)
                                                                at com.facebook.react.cxxbridge.CatalystInstanceImpl.onNativeException(CatalystInstanceImpl.java:465)
                                                                at com.facebook.react.cxxbridge.CatalystInstanceImpl.access$400(CatalystInstanceImpl.java:51)
                                                                at com.facebook.react.cxxbridge.CatalystInstanceImpl$NativeExceptionHandler.handleException(CatalystInstanceImpl.java:481)
                                                                at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:33)
                                                                at android.os.Looper.loop(Looper.java:154)
                                                                at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
                                                                at java.lang.Thread.run(Thread.java:761)
                                                             Caused by: com.facebook.react.devsupport.JSException: Could not get BatchedBridge, make sure your bundle is packaged correctly
                                                                at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
                                                                at android.os.Handler.handleCallback(Handler.java:751)
                                                                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:154) 
                                                                at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196) 
                                                                at java.lang.Thread.run(Thread.java:761) 
                                                             Caused by: com.facebook.jni.CppException: Could not get BatchedBridge, make sure your bundle is packaged correctly
                                                                at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) 
                                                                at android.os.Handler.handleCallback(Handler.java:751) 
                                                                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:154) 
                                                                at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196) 
                                                                at java.lang.Thread.run(Thread.java:761) 
OsamahM
  • 337
  • 1
  • 2
  • 16

5 Answers5

0

I also faced the same issue then i followed this answer(error "Could not get BatchedBridge, make sure your bundle is packaged properly" on start of app) and bang it works like a charm..!

Cheers :)

Community
  • 1
  • 1
Codesingh
  • 3,316
  • 1
  • 11
  • 18
  • it just keep it waiting in blank page ... when i close the app and open it again ... same problem comes up – OsamahM Apr 24 '17 at 21:32
  • delete the application from the device and reinstall it , basically do everything from scratch ... – Codesingh Apr 25 '17 at 18:06
0

There is currently a bug with the react-native-router-flux package. It is including a duplicate instance of react-native. All you need to do is npm install your packages, then remove the duplicate react-native entry.

rm -r ./node_modules/react-native-router-flux/node_modules/react-native
John D.
  • 2,521
  • 3
  • 24
  • 45
0

For me the problem was that 'adb' was not recognised. When I tried to run my project, there was no obvious indication that there was a problem with 'adb', but when I tried to run blank project it showed that command 'adb' is not recognised.

To fix this add C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools to Environment Variables

niceman
  • 251
  • 3
  • 16
0

What worked for me was the following.

Running npm start which gave me an error ENOSPC. I fixed that error with this answer https://stackoverflow.com/a/32600959/706798.

Then I ran react-native run-android again, and everything worked!

Anton
  • 2,282
  • 26
  • 43
0

Clear your windows temp data. (Win+R) Enter temp and %temp% files. after that npm start or npx react-native start (for Metro start) and npx react-native run-android (for run the app in the device). that's works for me. happy coding. :)

iamdhariot
  • 17
  • 1
  • 5