Reputation: 41
If I build my app using react-native run-android, I'm able to see my most recent changes on the android studio simulator. However, if I just open my project in Android Studio and run the app, the simulator runs an extremely old version of my app (from quite some time ago). For development purposes, this has not been an issue as I just ran react-native run-android to see my changes. However, now that I'm trying to upload a signed release version of the app onto the playstore, I'm finding that the generated signed apk is of the old version.
Things I've tried:
Upvotes: 2
Views: 1551
Reputation: 56
I'd say to try to follow the docs in this link: https://facebook.github.io/react-native/docs/signed-apk-android#docsNav
Since you successfully built it before then it's probably the same version of 1 that you had previously.
Try to change the gradle version in your app/build.gradle. Under default config:
defaultConfig { ...
versionCode 1
versionName "1"
}
signingConfigs {
Change the 1 to 2 and run the gradlew assembleRelease after clean.
Proof of Concept: https://play.google.com/store/apps/details?id=com.risenradiance
Upvotes: 1