android - 无法获取 BatchedBridge,请确保您的包已正确打包

标签 android node.js react-native

我在 Android 中遇到了 react-native 的问题 (无法获取 BatchedBridge,请确保您的 bundle 已正确打包) [![在此处输入图片描述][1]][1]

我尝试了一切:将 npm、react-native、react 和 package.json 中的所有依赖项更新到最新版本, 我删除了 node_modules 并重新安装,清除缓存 ... atc

错误日志

 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) 

最佳答案

我也遇到了同样的问题然后我遵循了这个答案(error "Could not get BatchedBridge, make sure your bundle is packaged properly" on start of app)并且砰的一声它就像一个魅力......!

干杯:)

关于android - 无法获取 BatchedBridge,请确保您的包已正确打包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43597090/

相关文章:

node.js - Typescript无法从套件中找到自定义的第三方类型

javascript - React Navigation 中的过渡背景颜色

java - 尝试从 Eclipse 到 Android Studio 执行 Android 应用程序的异常

java - Android创建没有源代码的库项目

android - Android 中的 Throttle Subject

android - 如何从 Parse 推送通知记录推送打开

android - 如何在没有 Android Studio 的情况下仅使用 SDK 工具为 React-Native 设置 Android?

java - 具有多项选择的 Android Spinner

javascript - 使用 webRTC 获取屏幕列表并选择要在 Electron 中记录的屏幕

javascript - Node.js 中的异步递归问题