0

I want to upload a draft of an APK to test In-App Billing that I am trying to implement. I see here that I am supposed to leave the android:versionCode="" the same in order to upload my APK as a draft so that is what I did. Now when I upload the new signed APK I get this error:

You need to use a different version code for your APK because you already have one with version code 3.

Did this process change with the new Beta and Alpha releases update in the Dev Console?

Community
  • 1
  • 1
Matt
  • 3,882
  • 14
  • 46
  • 89

1 Answers1

1

You need to have both with the same versionCode (signed with the same certificate):

  • uploaded version with version Y
  • local version with version Y

When you upload a new version, you always have to increase the version code, that's why you are having this error.

So you should increase the versionCode to 4, upload the new version as a draft to google play and test on your device!

And by the way, it takes a while for google to process your APK, it might not be ready as soon as you upload it!

thiagolr
  • 6,909
  • 6
  • 44
  • 64
  • 1
    First half of your comment: `You need to have **both with the same versionCode**, uploaded draft version with version Y and local version with version Y, signed with the same certificate.` Second half: `So I suggest you to **increase your versionCode** and then upload the draft version!` Did I read that wrong or did you contradict yourself? Do I need to increment the versionCode before uploading or no? If I increment the versionCode in the draft I am trying to upload, it will obviously have a different versionCode from the published version. – Matt May 20 '13 at 14:09
  • 1
    It was a little bit confusing, I edited my answer. You should increment the versionCode and upload it as a draft. – thiagolr May 20 '13 at 14:28
  • Understood! I will give this a test once Google is done processing the uploaded APK and report back with the results. – Matt May 20 '13 at 15:11
  • Did you increase it again when you created a new final (non-beta) version? – Martin Marconcini May 30 '13 at 00:01
  • Is there any way to delete the old apk and then reuse the same version code? – Colin Jan 28 '15 at 02:25
  • 1
    @Colin sure not, you can't. As some users may have downloaded your apk with the version code, and hence, they won't get your new uploaded apk as google play won't recognize it then as a new uploaded apk. – Alan Deep Jun 08 '15 at 00:30