I have edited the versionCode in both the android\app\build.gradle file :
versionCode 2
versionName "2.0"
and I have updated the AndroidManifest.xml file
package="com.reactnativeapp"
android:versionCode="2"
android:versionName="2.0"
BUT I still get this error when I try to release an update to my app on google play store!
You need to use a different version code for your APK or Android App Bundle
because you already have one with version code 1.
I have tried running
gradlew clean
in the android folder and rebuilding the project and nothing has worked. Does anyone have any ideas?
Make sure that you have your versionCode
and versionName
set inside defaultConfig
like this:
android {
...
defaultConfig {
versionCode = 2
versionName = "2.0"
}
...
}
You might have it set up for a debug-only config, which wouldn't change for release builds.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With