4

I have already uploaded the beta version, with version code 1, Now I m trying to upload the new version in Production mode. I am changing the versionCode from 1 to 2 and versionName from 1.0.0 to 1.0.1 Then I am genereating the signed APK.

But when I m trying to upload the apk, its showing "You need to use a different version code for your APK because you already have one with version code 1."

Please help me to get rid of the prob. (Do it need to delete the previous signed apk file which i have created at the time of generating signed apk and create again)

Rahul
  • 395
  • 5
  • 20
  • 1
    You apparently didn't rebuild the APK with the manifest changes, or you're not uploading the APK you just built. There's a tool you can use to check the versionCode of an APK (see http://stackoverflow.com/questions/15593328/how-to-solve-your-apks-version-code-needs-to-be-higher-than-2-in-google-play). – Michael Aug 15 '15 at 19:13

1 Answers1

1

You most likely changed your versionCode directly in your Manifest file. But if you use Android Studio, final Manifest file is generated and some parts may be overwritten during manifest merging phase (see blog post on what it is). So highlight your app module, press F4 and bump version code on Flavours tab.

enter image description here

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141