APK errors

"App not installed" error

Error text

App not installed.
App not installed as package appears to be invalid.

Cause

The phone refuses the install but does not say why. The usual causes are a signature difference, an older version, low storage, or a damaged file.

Step-by-step fix

  1. If an app with the same name was installed with another signature, remove it first.
  2. An APK with a lower versionCode than the phone's will not install; check it.
  3. Check storage and the APK's integrity.
  4. Read the real reason from adb install app.apk and adb logcat: it names INSTALL_FAILED_....
  5. Also remove a copy left in another user profile.

Example commands

adb install -r app.apk
adb logcat | grep -i -E "PackageManager|install"
adb shell pm list packages | grep example
apksigner verify --print-certs app.apk

How to prevent it

On test devices always install with adb install: the error text is exact.

Author and license: Nibras Code