Can't upload APK to Google Play because of version number

I’m trying to upload my first update to my app in Google Play, but I’m getting an error from the developer console saying: 
 

Upload failed

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

 
The weird thing is that I changed the version code in the Android Build pane to 2 (from 1). I’ve also tried changing it to 101 (Google’s documentation says any number above the last is acceptable, and 101 correlates to my version name). However, no matter what I set it to, google play doesn’t let me upload it. Does anyone know what the problem is here?

Thanks!

I know that you can also set the version in build.settings.

Maybe you have set it there and it takes precedence over the value entered in the build dialogue?

That was the problem. Thanks!

I know that you can also set the version in build.settings.

Maybe you have set it there and it takes precedence over the value entered in the build dialogue?

That was the problem. Thanks!

Just found out about this one. Thanks for this post… I wonder why we have the versioning in the build settings and then the one in the build window. Anyone from Corona Labs have any comments? Is the entry in the build.settings file still needed? Thanks

It is not needed. Simply don’t specify it on the build.settings (I never did).

Great! Thanks for the clarification. Most appreciated. 

I can’t say for certain, but probably in early versions of Corona SDK, the build dialog didn’t have entries for things like the versionCode and your only choice was to put them in the build.settings file.  It probably got documented somewhere and it’s perpetuated.   I’m sure there may be some people who are doing some form of version control where they have a folder with versionCode 1 in the build.settings and when they go to work on the next version, they create a new folder and update the versionCode.  This of course isn’t very efficient. 

I highly recommend that people keep things out of build.settings that they have on the dialog boxes, including the app name, the app bundle/package name and so on.

Rob

Agreed. My build.settings must be something I have been cloning and updating from very early days of Corona SDK. The version code in there was something that just remained. Till now! Getting rid of it from all my apps. Thanks much for your clarification.

what can i put in build settings? so that i can upload my game to google play?
 


settings =
{
    orientation =
    {
        default = “portrait”,
        supported = { “portrait” }
    },
    iphone =
    {
        plist =
        {
            CFBundleIconFile = “Icon.png”,
            CFBundleIconFiles =
            {
                “Icon.png”,
                “Icon@2x.png”,
                “Icon-72.png”,
                “Icon-72@2x.png”,
            },
        },
    },

    android =
    {
        usesPermissions =
        {
            “android.permission.VIBRATE”,
            “android.permission.INTERNET”,
        },
    },
}


 

I’m not sure I understand the question.  You put in your build.settings what you need.  If you are not using plugins and you don’t need any more Android permissions than you have listed, then you don’t need anything more.  If you’re only building for Android, you don’t even need the iphone block.

All of the other things, like Version number, Package Name, etc. are provided from the Corona SDK build screen.

Rob

Just found out about this one. Thanks for this post… I wonder why we have the versioning in the build settings and then the one in the build window. Anyone from Corona Labs have any comments? Is the entry in the build.settings file still needed? Thanks

It is not needed. Simply don’t specify it on the build.settings (I never did).

Great! Thanks for the clarification. Most appreciated. 

I can’t say for certain, but probably in early versions of Corona SDK, the build dialog didn’t have entries for things like the versionCode and your only choice was to put them in the build.settings file.  It probably got documented somewhere and it’s perpetuated.   I’m sure there may be some people who are doing some form of version control where they have a folder with versionCode 1 in the build.settings and when they go to work on the next version, they create a new folder and update the versionCode.  This of course isn’t very efficient. 

I highly recommend that people keep things out of build.settings that they have on the dialog boxes, including the app name, the app bundle/package name and so on.

Rob

Agreed. My build.settings must be something I have been cloning and updating from very early days of Corona SDK. The version code in there was something that just remained. Till now! Getting rid of it from all my apps. Thanks much for your clarification.

what can i put in build settings? so that i can upload my game to google play?
 


settings =
{
    orientation =
    {
        default = “portrait”,
        supported = { “portrait” }
    },
    iphone =
    {
        plist =
        {
            CFBundleIconFile = “Icon.png”,
            CFBundleIconFiles =
            {
                “Icon.png”,
                “Icon@2x.png”,
                “Icon-72.png”,
                “Icon-72@2x.png”,
            },
        },
    },

    android =
    {
        usesPermissions =
        {
            “android.permission.VIBRATE”,
            “android.permission.INTERNET”,
        },
    },
}


 

I’m not sure I understand the question.  You put in your build.settings what you need.  If you are not using plugins and you don’t need any more Android permissions than you have listed, then you don’t need anything more.  If you’re only building for Android, you don’t even need the iphone block.

All of the other things, like Version number, Package Name, etc. are provided from the Corona SDK build screen.

Rob