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
  • 7,777
  • 4
  • 43
  • 46
Sarath SVS
  • 49
  • 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
  • 2,089
  • 1
  • 14
  • 27
Nick Fortescue
  • 13,530
  • 1
  • 31
  • 37