Biribu
Biribu

Reputation: 3833

Update android app version

Where do I have to change app version in code (androidManifest.xml I guess) to make an update?

I am having problems because I always get the same message from google.

Upvotes: 3

Views: 299

Answers (2)

Vigbyor
Vigbyor

Reputation: 2604

You need to update following details,

android:versionCode="1"
android:versionName="1.0"

Here each time you upload a new .apk you need to increase versionCode to +1. Changing of version code is compulsory.

So if you are uploading this app next time then you need to write following,

android:versionCode="2"
android:versionName="1.0"

Change in VersionName is optional if you do not want to change it. However if you want to change it then you can change it's value.

Upvotes: 11

John Boker
John Boker

Reputation: 83729

You can have a look at the docs at http://developer.android.com/tools/publishing/versioning.html

android:versionCode — An integer value that represents the version of the application code, relative to other versions. The value is an integer so that other applications can programmatically evaluate it, for example to check an upgrade or downgrade relationship. You can set the value to any integer you want, however you should make sure that each successive release of your application uses a greater value. The system does not enforce this behavior, but increasing the value with successive releases is normative. Typically, you would release the first version of your application with versionCode set to 1, then monotonically increase the value with each release, regardless whether the release constitutes a major or minor release. This means that the android:versionCode value does not necessarily have a strong resemblance to the application release version that is visible to the user (see android:versionName, below). Applications and publishing services should not display this version value to users.

android:versionName — A string value that represents the release version of the application code, as it should be shown to users. The value is a string so that you can describe the application version as a .. string, or as any other type of absolute or relative version identifier. As with android:versionCode, the system does not use this value for any internal purpose, other than to enable applications to display it to users. Publishing services may also extract the android:versionName value for display to users.

Upvotes: 6

Related Questions