What happened
Tried pushing a new build to a test device via ADB and hit this wall:
adb install app-debug.apk
Failed
INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package signatures do not match previously installed version; ignoring!
The app was already on the phone โ installed from the Play Store or signed with a different keystore. Android refuses to overwrite it because the signature on the new APK doesn't match what's already there. It's a security check, not a bug. Android is doing exactly what it's supposed to.
Why this happens
Four scenarios cause this, and one of them almost certainly fits your situation:
- The device has the production build (signed with the release keystore) and you're trying to push a debug build.
- You generated a new keystore after losing the old one โ same package name, completely different signature.
- A teammate signed with their local
debug.keystore. Yours is different. Every dev machine generates its own. - The installed version came from the Play Store. Google Play App Signing re-signs APKs with Google's key. Your local keystore won't match that.
On first install, Android stores the signing certificate fingerprint. Every update must match it exactly โ no exceptions.
Debugging โ confirm the signature mismatch
Before wiping anything, take 60 seconds to confirm you're actually dealing with a signature mismatch. A corrupted download or wrong device can show similar errors.
Check the installed app's signature
# Get the package name first if you don't know it
adb shell pm list packages | grep yourappname
# Dump signing info of installed package
adb shell dumpsys package com.example.yourapp | grep -A5 "signatures"
Check the APK you're trying to install
# Using apksigner (comes with Android SDK build-tools)
apksigner verify --print-certs app-debug.apk
# Or using keytool
keytool -printcert -jarfile app-debug.apk
Compare the SHA-256 fingerprints. They'll look something like AB:CD:12:34:... โ 32 pairs of hex digits. Different values mean confirmed mismatch. Pick a fix below.
Solution 1 โ Uninstall then reinstall (most common fix)
Remove the old version. Install fresh. That's it.
# Uninstall keeping data (try this first)
adb uninstall -k com.example.yourapp
# If that fails, full uninstall (removes all app data too)
adb uninstall com.example.yourapp
# Now install the new APK
adb install app-debug.apk
Want to preserve app data across a signature change? Android intentionally blocks that. You'd need root access to copy the data directory by hand โ not worth it for most debugging scenarios.
Install with replace flag (only works if signatures match)
# -r replaces existing app โ still requires matching signatures
adb install -r app-debug.apk
# On older Android versions, add -d to allow version downgrade
adb install -r -d app-debug.apk
Solution 2 โ Uninstall directly from the device
No ADB connection? Do it the manual way:
- Settings โ Apps โ find your app โ Uninstall
- Or long-press the app icon โ App Info โ Uninstall
Then sideload the APK again via ADB or a file manager.
Solution 3 โ Share one debug keystore across the team
This fixes the root cause for team projects. Android auto-generates a unique debug.keystore on each machine. Different machines, different signatures, guaranteed conflicts on shared test devices.
The fix: pick one keystore, share it with everyone.
# Default debug keystore location
# macOS/Linux
~/.android/debug.keystore
# Windows
%USERPROFILE%\.android\debug.keystore
Commit it to the repo โ it's only used for debug builds, not a security risk โ or distribute it through your secrets manager. Each dev replaces their local debug.keystore with the shared one. Fingerprints now match across all machines.
To verify the fingerprint of any keystore:
keytool -list -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android
Solution 4 โ Play Store / App Signing enrolled apps
Google Play App Signing re-signs your APK with Google's key before distribution. Your local keystore will never match that key. Full stop.
Three ways out:
- Uninstall the Play Store version, then install your locally-signed build.
- Add a package name suffix for debug builds (e.g.,
com.example.yourapp.debug). Both versions coexist on the same device โ zero conflicts. - Use the internal test track on Play Console to distribute the actual Play-signed APK to testers.
Set up a debug application ID suffix in build.gradle
android {
buildTypes {
debug {
applicationIdSuffix ".debug"
versionNameSuffix "-debug"
}
}
}
Now debug and release are treated as two completely separate apps. No shared state, no signature conflicts, ever.
Verification
# Confirm the new app installed correctly
adb shell pm list packages | grep yourappname
# Check which version is installed
adb shell dumpsys package com.example.yourapp | grep versionName
# Launch it
adb shell monkey -p com.example.yourapp -c android.intent.category.LAUNCHER 1
App launches without crashing? You're done.
Lessons learned
- Set
applicationIdSuffix ".debug"from day one on any project headed to the Play Store. Five minutes of setup saves hours of signature conflicts later. - Commit a shared
debug.keystoreto your repo. Per-machine keystores are the silent killer of team test workflows. - Back up your release keystore to at least two places. Losing it means you can never push updates to the existing Play Store listing โ you'd have to publish a brand new app with zero ratings and reviews.
- On shared test devices, make uninstalling first a reflex. Do it before every install session, not just when things break.

