Using an ‘Unusual’ Timestamp as an Auto-generated Version Code for Android Apps

Google Api Error: apkUpgradeVersionConflict: APK specifies a version code that has already been used.
Warning: The greatest value Google Play allows for versionCode is 2100000000.

Two popular approaches

Just postpone the expiration date

set_version_script:
- U=$(expr $(date +%s) / 10) # increase by 1 in each 10 seconds
- echo "versionCode=${U}" >> version.properties
defaultConfig {
...
versionCode versionProperties['versionCode'].toInteger()
...
}

Conclusion

--

--

--

usually jiggy, similar to a cuboid.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
esplo

esplo

usually jiggy, similar to a cuboid.

More from Medium

How unit test can enhance our code quality?

Localazy localization tool from an Android developer perspective

The 6 Factors You Should Consider Before Hiring an Android App Developer

Before Hiring an Android App Developer

Kotlin ⚡️: Methods or Functions | Erselan Khan