In React Native running ./gradlew assembleRelease produce build apk,
but the JS code is not updated.I also did ./gradlew clean but still no luck.But If I did below two command the code is updated.
- npx 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-* && rm -rf
android/app/src/main/res/raw/*Do I always have to do this ?
2
Answers
I think you need clean with
./gradlew clean
then./gradlew assembleRelease
If you’re not using the React Native Gradle Plugin, then you have to run this bundling command before every release build. The bundling command create a React Native bundle, which will be included with your native Android app. You can refer this link
If you don’t want to run bundling command each time you make new build.