React Native build does not update settings

Asked

Viewed 489 times

0

I recently built a project with the name "project1" following the steps of documentation and since this project all my other projects are having the same name of this project, I change the build settings and it’s like I haven’t changed anything, the only things that are updating is the App.js code and the app icon, build settings like renaming the app, generating universal apk and generating an apk for each CPU architecture are being ignored and following the build settings of the first app I built on this machine.

NOTE: I’ve created several apps with the command react-native init nameApp and they follow the same build pattern as the first app, plus no error appears so I might be sharing here

1 answer

1

I had a similar problem. I use Windows and testo using the Genymotion emulator. It started to give a problem where the changes I made worked correctly in the emulator, but when generating an APK Signed and installing in the device, these changes did not appear.

The commands I used in case of problems did not work, like these:

react-native start --reset-cache

or

cd android
gradlew clean

In my case, the problem was solved by executing this command:

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/

After executing this command, I generated a new Signed APK (gradlew assembleRelease) and the device problem no longer occurs.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.