Home Ask Login Register

Developers Planet

Your answer is one click away!

Yarh February 2016

Is there a max value for versioncode?

We always have to increment versionCode by some arbitary number to publish it to google play.
Is there limit to that value and what will happen if it is reached?

defaultConfig {
        applicationId "my.app"
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 65
        versionName "1.05"
        setProperty("archivesBaseName", "myapp-$versionCode")



Gabriele Mariotti February 2016

According to android documentation and the gradle DSL documentation:

android:versionCode — An integer value that represents the version of the application code, relative to other versions.

Checking the java doc, by default, the int data type is a 32-bit signed two's complement integer, which has a minimum value of -2^31 and a maximum value of (2^31)-1.

Then the maximum value is 2^31-1.

Post Status

Asked in February 2016
Viewed 1,945 times
Voted 7
Answered 1 times


Leave an answer

Quote of the day: live life