Google Play Error Uploading .apk

Discussion in 'How Can I...?' started by pjpavlovich, Nov 18, 2015.

  1. pjpavlovich

    pjpavlovich Boxer

    Joined:
    Oct 4, 2015
    Messages:
    26
    Likes Received:
    1
    Can someone help me with this one - I get the following error when trying to upload my .apk to Google Play Store.

    Upload failed
    You uploaded an APK with an invalid version code, a version code must be specified and should be a positive integer.

    Where are they talking about? Thanks.
     
  2. nichenine

    nichenine Boxer

    Joined:
    Nov 10, 2015
    Messages:
    6
    Likes Received:
    1
    Your app should have a version number and version code. In Eclipse based projects they are found in AndrodManifest.xml (in Android Studio can be put in gradle settings instead of manifest)

    You should have some lines like this in the beginning of manifest:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    android:installLocation="auto"
    package="com.yourpackage.name"
    android:versionCode="1"
    android:versionName="1.0.1"

    Version code must be an integer number, eg: 1, 2, 3, 10, 225, etc...
     
    pjpavlovich likes this.
  3. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,545
    Buildbox has a spot in the Google Play project settings for the version code, there should not be any need to edit the manifest.
     
  4. pjpavlovich

    pjpavlovich Boxer

    Joined:
    Oct 4, 2015
    Messages:
    26
    Likes Received:
    1
    Right, I was wondering if I had to modify anything in the manifest because I have it in Buildbox. I will look in the manifest and see and share with you my results.
     
  5. pjpavlovich

    pjpavlovich Boxer

    Joined:
    Oct 4, 2015
    Messages:
    26
    Likes Received:
    1
    Sure enough, android:versionCode="0", no idea why, so I changed it to 1 and it was fine. thanks!
     
    Declan Emery likes this.

Share This Page