Apk failing to install on Android N with INSTALL_FAILED_INVALID_APK error

13,501

Solution 1

I had the same trouble when installing AOSP built apks.

I did

mm DEX_PREOPT_DEFAULT=nostripping

and it worked.

Solution 2

I faced this error in react native after the gradle was updated. I did nothing except cleaning the project.

cd android
gradle clean

fixed my issue on windows 10.

Solution 3

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.

Solution 4

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~

Solution 5

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 !!!

Share:
13,501
shreya_s7
Author by

shreya_s7

Software Engineer @ Imagination Technologies.

Updated on June 17, 2022

Comments

  • shreya_s7
    shreya_s7 about 2 years

    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]