I’m having issues publishing issues.
This is my second update, so I assumed I would just need to increment each of the following as seen below which have already been incremented:
Despite the incrementation, I am running into this issue seen below:
2
Ok, this is saying you uploaded an apk with VersionCode 2, which is already used previously.
So, Before releasing an app to the play store you must update the android:versionCode. Basically, the version code should be unique on each release.
So, if you didn’t updated the android:versionCode, please update it with a new unique number and then build another apk and upload.
If you updated the versionCode and it’s still happening, make sure you are uploading the corrected APK to the play console.
You cannot upload an APK to the Play Store with a versionCode you have already used for a previous version.
In build.gradle file you have to change inside defaultConfig versionCode and versionName.
for example:
defaultConfig { applicationId "com.android.example" minSdkVersion 22 targetSdkVersion 31 versionCode 6 versionName "1.0.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" }
For more detail follow this link https://developer.android.com/studio/publish/versioning
Click here to cancel reply.
2
Answers
Ok, this is saying you uploaded an apk with VersionCode 2, which is already used previously.
So, Before releasing an app to the play store you must update the android:versionCode. Basically, the version code should be unique on each release.
So, if you didn’t updated the android:versionCode, please update it with a new unique number and then build another apk and upload.
If you updated the versionCode and it’s still happening, make sure you are uploading the corrected APK to the play console.
You cannot upload an APK to the Play Store with a versionCode you have already used for a previous version.
In build.gradle file you have to change inside defaultConfig versionCode and versionName.
for example:
For more detail follow this link https://developer.android.com/studio/publish/versioning