Search code examples
androiddatetimebuildandroid-manifestversioning

Using a datetime for android versionCode?


Android's app versionCode is the following according to: http://developer.android.com/tools/publishing/versioning.html

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

They go on to suggest starting at 1 and incrementing.

I don't want to manage bumping a number and tracking all that. Can I just use a utc datetime? versionCode=20141106201953?

Seems like this would fulfill Google's requirements. Why is it a bad idea?

Edit: Pretty much a dupe of https://stackoverflow.com/a/24246191/670023


Solution

  • No. versionCode is an int. Java's Integer max value is 2147483647.