Ammar Tariq
Ammar Tariq

Reputation: 847

React native app keeps an old version in release

I have made many changes in my js code, when I run in debug mode I'm able to see all the changes but when I run the app in release mode or generate a release apk, the changes that were made and visible in debug mode are not visible.

What I have already tried?

react-native run-android --variant=release

Deleted the builds folder and android.bundle.js in assets

Upvotes: 9

Views: 4565

Answers (1)

Bhagwat K
Bhagwat K

Reputation: 3142

Run the below command before you run release variant in the project directory.

So command sequence will be first execute

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/

This may take little time to finsh.

Then execute your run command:

react-native run-android --variant=release

Upvotes: 22

Related Questions