Assets & configuration

versionCode and versionName: the two numbers that control updates

One is a label, the other is the law. How Android and Google Play use each, the scheme to adopt on day one, and the mistake that makes an update impossible to ship.

6 min read Updated September 2026

Every Android app carries two version fields. versionName is a free-text label shown to people: "1.0", "2.3.1", "Spring 2026". versionCode is a positive integer that nobody sees and that decides everything: Android will only install an APK over an existing one if its versionCode is equal or higher, and Google Play will only accept an upload whose versionCode is higher than every previous upload. Get the name wrong and it looks odd. Get the code wrong and you cannot ship.

The rule that matters

Each release must have a versionCode strictly greater than the last one you published. Not equal — Play refuses a duplicate — and not lower. It does not need to increase by one; 1, 2, 10, 11, 200 is a perfectly valid history. The maximum is 2,100,000,000, which sounds unreachable until someone uses a date-time stamp like 202609111430 and hits it on the first build.

For a website app that updates itself by URL, you may go months without a new build. When you do build — a new icon, a tab added — bump the code. The builder will not let two builds of the same project share one.

Schemes worth using

SchemeExampleGood for
Just count1, 2, 3 …Anyone. Simple, never wrong
Derived from the name1.4.2 → 10402Teams that want the code to explain itself
Date-based2026-09-11 → 20260911Frequent releases; leaves room for a suffix

The derived scheme — major × 10000 + minor × 100 + patch — is what the generator produces, and it has the nice property that the code is always higher when the name is higher:

Version Code GeneratorTurn a version name into a valid versionCode Open the tool
The version code generator converting version name 1.4.2 into version code 10402
Pick a scheme now and the arithmetic stays obvious for years.

What versionName should say

It is shown in Play's "What's new" area, in the phone's app-info screen, and nowhere that matters technically. Use whatever your users would understand. Semantic versioning (1.4.2) is conventional; a date (2026.09) is fine for a content app. It does not have to increase and Play does not check it — but users do notice a "2.0" that follows a "3.1".

What users experience

An update is a new APK or AAB with the same package name, a higher versionCode, and the same signing key. All three, or it is not an update: a different package name is a second app, a lower code is refused, and a different key is refused with a "signature does not match" error that no amount of version bumping fixes. Data — logins, local storage, preferences — survives an update and is lost on an uninstall.

Practical habits

Questions people ask

What is the difference between versionCode and versionName?

versionName is the label people see ("1.4.2"). versionCode is an integer Android and Play compare to decide what is newer. Only the code is enforced.

Why does Google Play reject my upload as a lower version?

Every upload's versionCode must be higher than every previous one, including uploads you never released. Increase it and rebuild.

Can two builds have the same version code?

Not usefully. Android treats equal codes as the same version and will install over it only if the signature matches; Play refuses duplicates outright.

What version should my first release be?

versionCode 1 and versionName 1.0. Increase the code for every build you distribute afterwards.

Read next

Ready to make your website into an app?

Paste a URL, or upload an HTML file or a ZIP, set your icon and name, and download a signed Android app from the free APK creator. No Android Studio, no command line.

Make my app — free