Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 421
Ammar Tariq Avatar asked Dec 11 '18 15:12

Ammar Tariq


1 Answers

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
like image 147
Bhagwat K Avatar answered Oct 18 '22 21:10

Bhagwat K