Flutter and app store releases · Decision guide
adb refuses to install an APK over a copy signed with another key
Short answer
adb: failed to install with INSTALL_FAILED_UPDATE_INCOMPATIBLE (signatures do not match newer version) means the device already holds that application ID signed by another certificate, and Android accepts an update only when certificates match. Uninstall the old copy, which deletes its data, or install a build signed with the same key. Applies to Platform-Tools 37 and Flutter 3.38 to 3.50.x.
Android lets a new APK replace an installed app only when both are signed with the same certificate. INSTALL_FAILED_UPDATE_INCOMPATIBLE with signatures do not match means the phone already holds that application ID under a different signer. The system compares certificates before it looks at version codes, so no flag on adb install can override it.
The question is who signed the copy that is on the phone. Three situations cover nearly every case, and the safe fix differs: the data on the phone is lost if you uninstall, so decide first whether it matters.
Find your case
- If one build is a debug build and the other a release build of your own appThey carry different keys; give debug its own application ID or uninstall once.
- If the installed copy came from Google Play or a Play test trackGoogle signed that copy with the app signing key.
- If two debug builds, from different machines or CIEach machine made its own debug keystore.
Find out who signed what
Read the certificate of the APK you are installing, and compare it with what you know about the installed copy. apksigner ships in the Android SDK build-tools.
Certificate of the new APK, and the package on the device
apksigner verify --print-certs app-release.apk
adb shell pm list packages | grep com.example.appDebug versus release
Android's signing documentation explains that debug builds are signed with a debug keystore the tools create, while a release needs your own key. A fresh Flutter project signs release builds with the debug key, so the clash starts the day you add a release signing config: from then on the release APK cannot replace a debug install, and the reverse is also refused.
To keep both on one phone, give the debug variant its own application ID. They then install side by side as two apps.
build.gradle.kts, separate ID for debug
android {
buildTypes {
debug {
applicationIdSuffix = ".debug"
}
}
}Uninstalling deletes the app's data on the device. Export anything you need first.
A copy installed from Google Play
With Play App Signing you sign uploads with an upload key, and Google signs the APKs it delivers with a different app signing key that it holds. A store copy therefore carries a certificate that neither your debug build nor your upload-key build has, and installing your local file over it is refused.
Uninstall the store copy before side-loading, or test the release build the way users get it, through a Play testing track, so every install on that phone comes from the same signer.
Remove the store copy, then install
adb uninstall com.example.app
adb install app-debug.apkDebug builds from different machines
The tools create a debug keystore per machine, by default at $HOME/.android/debug.keystore. A teammate's laptop, a CI runner or a reinstalled computer each have their own key, so a debug APK from another source is a stranger to the device.
Choose one debug keystore and copy it to the same path on every machine and runner that builds debug APKs for shared test devices. Uninstall the stray copy once and reinstall.
Compare the fingerprint on two machines
keytool -list -v -keystore ~/.android/debug.keystore -storepass android | grep SHA256What the Flutter tool does for you
flutter run often hides this error. When its install fails and the app is already present, it prints that it is uninstalling the old version and installs again, which also wipes the app's data. If you see a different INSTALL_FAILED_ code, such as a version downgrade, it is a separate problem.
In short
- Same application ID plus a different certificate is always refused.
- Uninstall deletes data; separate debug IDs avoid the need.
- Share one debug keystore across machines that feed the same test phones.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. 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.