My app is running fine on Android in debug mode. But in release mode it crashes with this error:
com.facebook.jni.CppException: Could not get BatchedBridge, make sure your bundle is packaged correctly
I have enabled bundle in release:
project.ext.react = [
enableHermes: true,
bundleInRelease: true,
]
When I inspect my app bundle I can see index.android.bundle in base/assets folder. It is also in build/intermiates/assets.
I am building my app using fastlane:
lane :internal do
android_set_version_code()
gradle(task: "bundleRelease")
supply(track: 'internal', skip_upload_apk: true)
end
My React Native version is 0.62.2.
When I try a release with a new RN project it works with same settings.
How can I fix this?
UPDATE:
I have fixed the problem by creating a new RN project and moving my source files to the new project.