How to fix INSTALL_FAILED_INVALID_APK error in Android Studio?

前端 未结 9 1634
一整个雨季
一整个雨季 2021-02-08 23:37

I have recently updated my Android Studio to 3.6.1, thereby also updating gradle plugin to 3.6.1 and the gradle wrapper to 5.6.4

When running the debug build, I keep get

相关标签:
9条回答
  • 2021-02-09 00:15
    application>- android:extractNativeLibs="true" 
    

    work for me


    minSdkVersion 23
    
    ndk {
       abiFilters "armeabi-v7a"
    }
    

    minSdkVersion is less than 23, work for me too

    0 讨论(0)
  • 2021-02-09 00:16

    I tried updating the Android Studio but it still get the INSTALL_FAILED_INVALID_APK error. Then I updated the firebase dependencies and still to no avail

    Interestingly though, it worked smoothly on another project that I have. Which led me to check which dependencies they differ in and realized that the only major dependency is the AppDynamics gradle plugin

    I remove the AppDynamics instrumentation and it worked! I am assuming that even before, the AppDynamics instrumentation in gradle was the cause that prevented the app from running properly. I have confirmed it is an issue with the AppDynamics plugin. See link for reference: https://community.appdynamics.com/t5/End-User-Monitoring-EUM/AppDynamic-EUM-setup-for-Android-Cordova-project/td-p/38864

    For the meantime, I will be downgrading until AppDynamics provides a fix

    0 讨论(0)
  • 2021-02-09 00:16

    Deleting existing app on the phone with same bundle ID worked for me.

    0 讨论(0)
  • 2021-02-09 00:16

    I remember having the same issue and solving it with build>clean project. but as you say that this doesnt work here is a link talking about subtle changes in your apps package name in the Manifest and its pretty recent. Just thought it might be woth a look as it does not appear in the list of things you have already checked. plus the logs you published talk about the package name being unknown so that seems suspicious.

    I hope it helps

    0 讨论(0)
  • 2021-02-09 00:19

    Sometimes it is because of the emulator/device you are installing your apk on. If you have previously installed apk on a device and then uninstalled, then it might still exist on your device. So, in the emulator, go to settings -> Apps, then check for the application in the list. If exist, click on that particular application and then click on 'Uninstall for all users'(Typically from three dots in right corner).

    Hope it helps :)

    0 讨论(0)
  • 2021-02-09 00:25

    I faced the same issue. Try to uninstall the app via terminal adb uninstall com.packagename command and then reinstall the app. Basically, sometimes the app is isntalled for other users in device and uninstalling from device just uninstalls it from current user, that's why it gives this error. Give it a try, I hope it will helps.

    0 讨论(0)
提交回复
热议问题