Docs › Versioning your app
Versioning your app
Android apps carry two version fields:
- versionName — the human version users see, e.g.
1.2.0. - versionCode — an integer Google Play uses to order releases. Every upload to Play must have a versionCode strictly higher than the last one already on Play (across all tracks).
Set the version on the build form
On the Build tab (Android), the Version name and Version code fields are optional:
- Leave them blank to use whatever is in your repo (
app.json/
build.gradle).
- Set them to override for this build. BuildStack applies them before the build
(to app.json and the generated build.gradle), so you don't have to edit and commit your repo just to bump a version.
Publishing to Google Play
This is where versionCode matters most. If you upload a versionCode that Play has already seen, the publish fails with "Version code N has already been used."
- Check the highest versionCode currently on Play (Play Console → your app →
any track, or App bundle explorer).
- On the build form, set Version code to a higher number.
- Build with Publish to Google Play on — see
A simple convention: bump versionCode by 1 for every build you publish, and set versionName to the release users should see.
Tips
- versionName is cosmetic — reuse or change it freely.
- versionCode must only ever go up. Once a number is uploaded to any track it's
spent, even if that release was a draft you never rolled out.