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
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.
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
.
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
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.
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" >
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.