Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android: google developer console change apk version

Tags:

android

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

like image 690
manhon Avatar asked Sep 14 '26 19:09

manhon


2 Answers

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.

like image 127
orangey Avatar answered Sep 16 '26 07:09

orangey


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.

like image 44
Bubunyo Nyavor Avatar answered Sep 16 '26 08:09

Bubunyo Nyavor