6

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?

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.