I am using two methods to build an APK in React Native project.
- using
react-native run-android
and take the latest apk from projectFolder>android>app>build>output>apk. react-native bundle --dev false --platform android --entry-file index.android.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug
then run:
cd android
gradlew assembleDebug
then physically locate the file at android/app/build/outputs/apk
folder:
app-debug.apk
app-debug-unaligned.apk
The problem I am facing is that if I am building apk from above-mentioned methods then generated apk is not the build of updated code. But the same code which I am running on the Android simulator of Android Studio is working perfectly. Also if I am using a real device as an emulator connected to the android studio, it's running on the older version of build.