APK errors

Parse error (problem parsing the package)

Error text

There was a problem parsing the package.
INSTALL_PARSE_FAILED_NO_CERTIFICATES / INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

Cause

Android cannot read the APK: the file was downloaded partly, it is unsigned, the manifest is damaged, or the phone's Android version is below minSdk.

Step-by-step fix

  1. Check file integrity with unzip -t app.apk. If it fails, download again.
  2. Use apksigner verify to confirm the APK is signed.
  3. Read sdkVersion with aapt2 dump badging and compare it with the phone.
  4. Follow the order after zipalign: zipalign first, then apksigner.
  5. If the file name or path is unusual, copy it under a simple name.

Example commands

apksigner verify --verbose app.apk
aapt2 dump badging app.apk | head
zipalign -c -v 4 app.apk
unzip -t app.apk

How to prevent it

Always take signed builds from Gradle for release; do not patch by hand.

Author and license: Nibras Code