0

After running logcat. I discovered the follow error exception:

AndroidRuntime: 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.

Doesn't creating an apk/running the variant release version automatically include the bundler? How do I rebuild and verify that the bundler has been included in the apk/variant release?

I tried adding bundleAssetName: "index.android.bundle", to

project.ext.react = [
    entryFile: "index.js",
    bundleAssetName: "index.android.bundle",
]

I still got the same issue(repeatedly crashing). I did a search for "exception" and found this error:

java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@b60a260 does not exist
VK1
  • 1,676
  • 4
  • 28
  • 51
  • try [link](https://stackoverflow.com/questions/44446523/unable-to-load-script-from-assets-index-android-bundle-on-windows) – tajammul1996 Oct 31 '18 at 07:33

1 Answers1

0

In order to make sure the bundler is included in the apk, this was needed

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

Shamelessly taken from this post.

VK1
  • 1,676
  • 4
  • 28
  • 51