Release APK not updating with JavaScript code

My Android APK worked with JavaScriptwhen I generated the first signed APK. I tried to clean / rebuild the project in Android Studio, I tried ./gradlew cleanin a subfolder android. Any ideas as to why the code is not updating? I saw this problem , without any success for myself.

+4
source share
1 answer

I deleted the files index.android.*in the directory android/app/src/main/assets/. Then at the root of the project ran

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

Then I restored the signed APK and voila!

EDIT: If you are using a new project, you may have more than that index.android.js index.js. If this happens, you will want to change it to:

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
+6
source

Source: https://habr.com/ru/post/1682766/


All Articles