Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

A new Flutter release APK installs or uploads as the old version

ErrorFlutter build apk on release mode cannot generate updated version

Short answer

Android decides what is an update from the version code, and Flutter takes it from the build number in pubspec.yaml. If you rebuild without raising it, the new APK looks identical to the old one. Raise the number after the plus sign, rebuild, and pick the APK from build/app/outputs.

  • Applies to Flutter 3.x stable, Android Gradle Plugin 8.x, adb from Platform Tools
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Check which version the project will build with. The number after the plus sign becomes the Android version code.

    grep -n "^version:" pubspec.yaml
  2. 2Match what you see, then jump to its fix

    1. 1version: 1.0.0+1 is the same as in the last build you shippedThe version in pubspec.yaml was not changedFix
    2. 2The build finished with new code, but the app behaves like the old buildYou are installing or uploading an old fileFix
    3. 3adb install fails on an already installed appadb install is refused or keeps the old buildFix
    4. 4Play or the device shows a version code far above the number after the plus signSplit APKs have version codes that differ from your build numberFix

What does the error look like?

  • Flutter build apk on release mode cannot generate updated version
  • The new APK installs but the app still shows the old version
  • adb install of the new APK does not replace the installed build

Cause 1 of 4

The version in pubspec.yaml was not changed

1Check

Flutter reads versionName and versionCode from the version field in pubspec.yaml. The part before the plus sign is the version name; the part after it is the build number, which becomes the version code. Rebuilding with the same line gives an APK that looks the same to Android and to Google Play.

grep -n "^version:" pubspec.yaml

2Fix

Raise the build number every time you ship. You can edit pubspec.yaml, or override both values for one build with the build flags.

# pubspec.yaml
version: 1.0.1+2

# or, for one build only
flutter build apk --build-name=1.0.1 --build-number=2

3Verify

Rebuild, then reinstall or upload the new file.

flutter build apk

Confirmed by docs.flutter.dev

Did this fix it?

Cause 2 of 4

You are installing or uploading an old file

1Check

Release files are written under build/app/outputs in your project. With --split-per-abi there is one file per CPU type in the flutter-apk folder, so an older file for a different ABI can sit next to the new one. Look at the timestamps.

ls -lt build/app/outputs/flutter-apk/

2Fix

Use the file with the newest timestamp that matches the device. For an app bundle the file is build/app/outputs/bundle/release/app.aab.

flutter build apk --split-per-abi
ls -lt build/app/outputs/flutter-apk/

3Verify

Install the newest file on the connected device.

flutter install

Confirmed by docs.flutter.dev

Did this fix it?

Cause 3 of 4

adb install is refused or keeps the old build

1Check

Android only treats an install as an update when the app is already present and the version code is not lower. A lower code counts as a downgrade, which adb rejects unless you ask for it.

adb install -r build/app/outputs/flutter-apk/app-release.apk

2Fix

Reinstall with -r to keep the app data. For a lower version code during testing, add -d to allow the downgrade; a later build number is the cleaner fix.

adb install -r build/app/outputs/flutter-apk/app-release.apk
adb install -r -d build/app/outputs/flutter-apk/app-release.apk

3Verify

The install prints Success and the app opens with the new version shown inside it.

adb install -r build/app/outputs/flutter-apk/app-release.apk

Confirmed by developer.android.com

Did this fix it?

Cause 4 of 4

Split APKs have version codes that differ from your build number

1Check

With split APKs the Flutter tooling adds ABI_VERSION * 1000 to the version code, so each CPU type gets its own code. That is by design and not a failed update.

flutter build apk --split-per-abi

2Fix

Keep raising the build number for every release. The Flutter page documents a Gradle property, force-version-code-ignoring-abi=true, that keeps the plain code; read that page before using it.

flutter build apk --split-per-abi --build-number=3

3Verify

Compare the files in the flutter-apk folder after the build.

ls -l build/app/outputs/flutter-apk/

Confirmed by docs.flutter.dev

Did this fix it?

How do I stop it coming back?

  • Raise the build number in pubspec.yaml in the same commit that you tag for release.
  • In CI, pass --build-number from a counter so two builds never share a version code.
  • Keep the old and new files in separate folders so you never upload the wrong one.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

Google Play says the app does not support 16 KB memory pages

check_elf_alignment.sh reports UNALIGNED for a library under lib/arm64-v8a

Google Play requires apps that target Android 15 or higher and ship native .so libraries to run on devices with 16 KB memory pages; from 1 February 2027 it will block updates that do not.

5 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.