manhon
manhon

Reputation: 683

android: google developer console change apk version

I'm getting this error when uploading my revised app to the Google Play Developer Console: "Your APK's version code needs to be higher than 1." I should use version 0.9 before. I would like to use version 1 for my first release of app. How can I correct it? thanks

Upvotes: 3

Views: 4447

Answers (5)

Bubunyo Nyavor
Bubunyo Nyavor

Reputation: 2570

With the growing popularity of Android Studio and Gradle, ie if you are using that, then u will have to do it in the build.gradle file. This is for people who might stumble on this post for in the future, as i did.

this is what your would have to edit.

defaultConfig {
    minSdkVersion 9
    targetSdkVersion 19
    versionCode 2
    versionName "1.1"
}

Change the verCode and the versionName as you would in the AndroidManifest.

Upvotes: 2

heLL0
heLL0

Reputation: 1425

You can call it .9 but you have to refer to it in your manifest as 1.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yourthing.here"
android:versionCode="1"
android:versionName="0.9" >

When you release version 1 you include it in your manifest as such:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yourthing.here"
android:versionCode="2"
android:versionName="1.0" >

That should work. Not sure 100% sure if naming less than 0 is ok but I'd think it should be.

Upvotes: 2

laminatefish
laminatefish

Reputation: 5246

The VersionCode is just an integer and is designed to be incremental. It's the versionName that you can set to whatever you like. VersionCode must be incremented each release.

So, set your VersionCode to 2 and your VersionName to "0.9" :) Job done!

As a guide:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.goosesys.dta_pta_test"
android:versionCode="4" 
android:versionName="3.1" >

Upvotes: 1

Bryan Herbst
Bryan Herbst

Reputation: 67209

The android:versionName attribute does not matter. You can put whatever you want in there and the Developer Console will not care.

The Developer Console is complaining about the android:versionCode attribute which must be incremented every time you upload a new APK (and it must be a number).

Fortunately your users will never see this particular value. It is simply for Google Play (and yourself) to keep track of versions.

Upvotes: 1

Savv
Savv

Reputation: 431

Check your AndroidManifest.xml file's versionName and versionCode. You need it increase these numbers, the versionCode should always be increased by 1, and versionName to whatever you like

Upvotes: 1

Related Questions