Based on android documentation:
android:versionCode — An integer
value that represents the version of the application code, relative to other versions.
Edit - Android documentation explicitly states -
Warning: The greatest possible value for android:versionCode is MAXINT
(2147483647). However, if you upload an app with this value, your app
can't ever be updated.
Based on oracle documentation:
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. In Java SE 8 and later, you can use the int data type to represent an unsigned 32-bit integer, which has a minimum value of 0 and a maximum value of (2^32)-1.
android:versionName — A string
value that represents the release version of the application code, as it should be shown to users.
Regarding String
max length, this SO question may help you.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…