APK errors

INSTALL_FAILED_UPDATE_INCOMPATIBLE

Error text

adb: failed to install app.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.example.app signatures do not match previously installed version; ignoring!]

Cause

An app with the same package name is installed on the phone with a different signature. Android does not allow updates signed differently.

Step-by-step fix

  1. Understand that the installed app was built with another key (for example debug or Play).
  2. If data loss is fine, remove it with adb uninstall package.name and install again.
  3. If you need to keep data, update with an APK signed by the earlier key.
  4. With several users or a work profile, uninstall from each one.
  5. Give debug and release different applicationIdSuffix values for testing.

Example commands

adb uninstall com.example.app
adb install -r app.apk
adb install -r -d app.apk    # versiya aşağı salmaq üçün

How to prevent it

Use a .debug suffix for debug builds so they never clash with release.

Author and license: Nibras Code