Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages

Help for owners

Google Play will not accept my update because the version code was already used

Short answer

Every Android release carries a version code, a whole number that must be higher than the last release. Android's documentation says you cannot upload to Google Play a build with a version code you already used for a previous version. The fix is a higher number in the next build, not a change on Google's side.

  • Written for business owners
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Does this sound like your situation?

  • The Play Console says the version code has already been used, or must be higher.
  • The developer rebuilt the app and uploaded it again, and the same error came back.
  • The version shown to customers went up, but the upload is still rejected.
  • Two people or two machines build releases and the numbers collided.
  • A test upload from months ago used a number the real release now needs.

Why does this happen?

  1. The version code is a counter, separate from the version name

    Android describes the version code as a positive whole number used internally to tell whether one version is newer than another. The version name is the separate label customers see, such as 2.1. Raising only the name leaves the counter unchanged.

  2. A number can be used only once

    The documentation states that you cannot upload an APK to the Play Store with a version code you have already used for a previous version, and that each successive release should use a greater value. A number consumed by an internal test or a failed upload counts as used.

  3. The build setting did not change

    The version code is set in the app's build files. When the build is made from an old copy of the code, or a setting is overridden elsewhere, the new build quietly carries the old number.

  4. There is a ceiling

    Google Play allows a version code of at most 2100000000. Schemes that put dates or build timestamps into the number can reach that limit sooner than expected.

  5. Several people release from different places

    If the number is typed by hand on more than one machine, two builds can end up with the same value, and the second upload is rejected.

What can I do about it today?

  1. Read the exact messageCopy the full text of the Play Console error, including any number it mentions, and send it to the developer instead of a summary.
  2. Ask for the highest code ever uploadedIn Play Console, the app's release pages list the version codes used on each track. The next build needs one higher than the highest of them.
  3. Do not upload the same file againRe-uploading a file with the same number only gives the same error. A new build with a higher number is needed.
  4. Agree who numbers releasesDecide that one person or one automated process sets the number, so nobody types it separately.
  5. Do not try to change numbers in the storeThe number lives inside the build file. There is nothing to edit in the Play Console for a release already uploaded.

When should I bring someone in?

  • The number was raised and Play still rejects the upload.
  • Several apps or variants of the same app each have their own numbering and they clash.
  • Nobody is sure which machine or pipeline builds the real release.

How do I handle it?

  1. Read the history in Play ConsoleI list every version code on every track, including tests and failed releases, to find the highest one in use.
  2. Set the number in one placeThe version code is set in the build configuration, and where possible it is derived from a counter in the release process, not typed by hand.
  3. Check the finished fileBefore upload I read the number inside the built file, because the setting and the result can differ.
  4. Upload to a test track firstThe build goes to an internal track and is checked there, so a number problem shows up before the production release.

The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.

What do owners ask about this?

Is the version code the number users see?

No. Android says the version name is the only value displayed to users. The version code is internal.

Can I go back to a lower number?

Android also prevents installing a lower version code over a higher one, as a protection against downgrades. A lower number is only intended for special cases such as publishing several files for different devices.

Does this mean my app was rejected?

No. The file was refused at upload, before any review. Nothing has been published or changed for customers.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.

For your developer: the technical fixes

Next step

Want this off your desk?

Send me a few lines on where things stand. I reply within 24 hours.