After updating gradle plugin from 7.1.3 to 7.2.1, when attempting to build and install our app in AndroidStudio I get the error INSTALL_FAILED_INVALID_APK … base.apk is missing.
I noticed, that the built apk file is very small (~6 MB instead of ~20 MB).
When switching back to gradle plugin 7.1.3, everything is fine.
I am using Android Studio Chipmunk 2021.2.1 Patch 1.
6
Answers
Eventually, I found out that the issue was caused by
testCoverageEnabled true
in my build.gradle buildType. I don't know how and why, and it is not an ideal situation, but removing it, fixed the problem.August 16, 2022
With gradle plugin version 7.2.2 from latest update the problem seems to be fixed and I can again build APKs with
testCoverageEnabled true
.Try to remove the old debug app and try again after a clean build
You can try any one of these
Let me know if you have solved it.
a little late.
There can be multiple possibilities for the issue.
I also faced this issue back in the day.
Fix 1 -> your package name must have ‘.’ eg: com.example.app
Fix 2-> Just remove old APK android/app/build/outputs/apk/debug/app-debug.apk in the folder
Please do give these a try. I hope your issue gets resolved.
Just remove old APK android/app/build/outputs/apk/debug/app-debug.apk in the folder. that’s all. enjoy your coding…