Is the negative version code for an Android app valid?

I am working on a platform for publishing Android apps and I want to make sure using negative version code for Android apps is valid? I tried it and it built and worked fine.

+3


source to share


2 answers


I believe that this is indeed the case. As the android developer site says below:

Internal version number. This number is only used to determine whether one version is later than the other, with higher numbers indicating later versions. This is not the version number shown to users; this number is specified by the versionName attribute.

The value must be set as an integer, for example "100". You can define it but you want if each subsequent version has a higher number. For example, this could be the build number. Or, you could convert the "xy" version number to an integer by encoding "x" and "y" separately in the lower and upper 16 bits. Or you can just increase the number for each time a new version is released.



Source

+2


source


You downloaded an APK or Android app package with an incorrect version code; the version code must be specified and must be a positive integer.

This is the error you get if you download an app with a negative version code! ..



On Google Play, only positive integer is allowed for versionCode

0


source







All Articles