我的应用程序在 Android
上运行良好在 Debug模式。但在 Release模式下,它会因以下错误而崩溃:
com.facebook.jni.CppException: Could not get BatchedBridge, make sure your bundle is packaged correctly
我在发行版中启用了 bundle :
project.ext.react = [
enableHermes: true,
bundleInRelease: true,
]
当我检查我的应用程序包时,我可以看到
index.android.bundle
在 base/assets
文件夹。它也在 build/intermiates/assets
.我正在使用 faSTLane 构建我的应用程序:
lane :internal do
android_set_version_code()
gradle(task: "bundleRelease")
supply(track: 'internal', skip_upload_apk: true)
end
我的
React Native
版本是 0.62.2
.当我尝试使用新的 RN 项目发布时,它使用相同的设置。
我怎样才能解决这个问题?
更新:
我通过创建一个新的 RN 项目并将我的源文件移动到新项目来解决了这个问题。
最佳答案
我也遇到了同样的问题,这是由于 enableHermes: true
更改 enableHermes: false
和 重建
关于android - React Native Android : Could not get BatchedBridge, 确保你的包被正确打包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62072263/