Home » Android » Apk failing to install on Android N with INSTALL_FAILED_INVALID_APK error

Apk failing to install on Android N with INSTALL_FAILED_INVALID_APK error

Posted by: admin June 15, 2020 Leave a comment

Questions:

I was trying to install apk with adb install but when I tried to install it I got the following error,

Failure [INSTALL_FAILED_INVALID_APK: Package couldn’t be installed in /data/app/conform.src.com.conform-1: Package /data/app/conform.src.com.conform-1/base.apk code is missing]

How to&Answers:

I had the same trouble when installing AOSP built apks.

I did

mm DEX_PREOPT_DEFAULT=nostripping

and it worked.

Answer:

I came upon with this problem.

After looking for package_and_sign_apk, I found that google is using apksigner (instead of jarsigner)released after android-build-tools-24.0.3.

And I re-packaged my apk with command line(aapt),and signed with apksigner.

All work well.

Hope to help u some little~

Answer:

Just fixed this issue on my machine: windows.

Upgraded android studio (gradle upgraded as well as a result).

Had some minor issues with the manifest file as a result of AADT. Project installed and launched after.

Answer:

I had the same problem when I wanted to try out some java 8 features.
It started to work immediately after I removed this from my gradle file.

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

Note that this is probably not a solution when you’re already using
java 8 features in your Android project.

Answer:

If you’re using DexGuard obfuscator (like me), this issue can be caused by it. Updating DexGuard to latest version should fix it.

Answer:

Working Solution:

  1. You need to create a blank app.
  2. Open the the blank app’s csproj file
  3. copy the property group code for Debug, Debug-any cpu, release any cpu
  4. Replace in your project’s csproj file
  5. Clean & Run

Cheers !!!

Answer:

In my case the problem was missing storage in my device. Deleting some files enabled me to continue installation.