How do build or generate index.android.bundle?

I migrated from SDK 40 to 42 and built EAS build.

Here is my eas.json file

{
  "build": {
    "prod": {
      "distribution": "store",
      "android": {
        "buildType":"app-bundle"
      },
      "ios": {}
    },
    "stage": {
      "developmentClient": true,
      "distribution": "internal",
      "android": {

      }
    },
    "dev": {
      "developmentClient": true,
      "distribution": "internal",
      "android": {

      }
    }
  }
}

After successful build I installed the standalone apk and running the app I got following error

Unable to load script. Make sure you’re either running a Metro server (run ‘react-native start’) or that your bundle index.android.bundle is packaged correctly for release.

Do I need to create or build index.android.bundle & index.ios.bundle? If yes, then how can I do so.

either

  • remove "developmentClient": true, if you want to have js bundled inside the apk
  • run react-native start or (yarn start) if you want to start a bundler server for deveopment
1 Like

Thank you, Removing developmentClient: true worked for me.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.