Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apk failing to install on Android N with INSTALL_FAILED_INVALID_APK error

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]

like image 667
shreya_s7 Avatar asked Oct 05 '16 14:10

shreya_s7


5 Answers

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.

like image 74
Sanan Ali Avatar answered Nov 20 '22 06:11

Sanan Ali


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

like image 36
Ramesh Upadhaya Avatar answered Nov 15 '22 19:11

Ramesh Upadhaya


I had the same trouble when installing AOSP built apks.

I did

mm DEX_PREOPT_DEFAULT=nostripping

and it worked.

like image 15
Shigeru Moriwake Avatar answered Nov 20 '22 05:11

Shigeru Moriwake


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~

like image 1
fantianwen Avatar answered Nov 20 '22 06:11

fantianwen


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.

like image 1
Shiva Ramdeen Avatar answered Nov 20 '22 06:11

Shiva Ramdeen