Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28479

index.android.bundle not updating when creating release build

$
0
0

I'm working on a Project in ReactNative & it's working fine in debug build (When installing via react-native run-android but When I generate a release build it crashes as soon as I open it, according to logs it's unable to load script, and android/app/src/main/assets directory is empty.

To resolve this I had to run these commands: 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

rm -rf ./android/app/src/main/res/drawable-*

But now the file index.android.js won't update in a release build, so I have to run the above commands every time I need a release build, what am I doing wrong?

Here are my packages.json details:

"scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },



"react": "16.8.3",
    "react-native": "0.59.5"

In short: How to create or update index.android.bundle automatically when I generate a release build?


Viewing all articles
Browse latest Browse all 28479

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>