0

When i try to upload new apk in playstore it says "You need to use a different version code for your APK because you already have one with version code 4" but there is no apk in apk library with version code 4 there is only 2 and 3. but I Changed the version code in build.gradle file to versionCode 5. but its shows the same error "You need to use a different version code for your APK because you already have one with version code 4. " I tried Clean Project,Rebuild Project and In-validate Cache/Restart but whatever I do the error message from google is same.

What would i do

Suraj Vaishnav
  • 6,867
  • 3
  • 40
  • 43
Sarath SVS
  • 39
  • 1
  • 8

1 Answers1

0

Make sure you are changing the (int) version code rather than just the version name. You can inspect the version code for an APK by doing:

aapt dump badging foo.apk |grep version

aapt can be found in {sdk directory}/build-tools/{sdkversion}/

More informations about aapt: What is aapt(Android Asset Packaging Tool) & How it works?

Valentin Michalak
  • 1,935
  • 1
  • 14
  • 24
Nick Fortescue
  • 12,924
  • 1
  • 29
  • 37