Failure [INSTALL_FAILED_INVALID_APK]

后端 未结 30 1514
庸人自扰
庸人自扰 2020-11-27 04:12

When I click to run a project I just created in Android Studio 0.2.10 and select my Android (connected by USB with debug by USB on) I get this error:

Waiting         


        
相关标签:
30条回答
  • 2020-11-27 04:46

    I had the same problem but none of the solutions worked for me. The problem was that I had no . separators in my package name.
    i.e. if your package name is my.packagename its fine but it can't be just mypackagename
    Got the hint from this bug report.

    https://code.google.com/p/android/issues/detail?id=55841

    0 讨论(0)
  • 2020-11-27 04:48

    I tried most above offered solutions (the simple ones, not those offering chmod and altering internal libraries) and none of them work

    Eventually what worked for me was: "Clean Project" -> "Rebuild Project" -> changed the app versionName in the build.gradle app module -> Sync Gradle -> Run the app on the device

    0 讨论(0)
  • 2020-11-27 04:48

    You can get this error if the minSdkVersion in builde.gradle is bigger than the device's Android version. In that case you have to modify the minSdkVersion.

    0 讨论(0)
  • 2020-11-27 04:48

    delete code in AndroidManifest.xml:

    tools:replace="android:appComponentFactory" android:appComponentFactory=""

    it works.

    0 讨论(0)
  • 2020-11-27 04:49

    I had this problem on android Studio because in my Debug build i've added version name suffix -DEBUG and the - was the problem.

    Try to only have letters, numbers and dots on your version names and application ids

    0 讨论(0)
  • 2020-11-27 04:50

    The cause of this problem for me was having the wrong build variant selected for one of my app's modules. From the "Build Variants" tool, I selected the module variant which matched the app module, and it fixed the issue for me.

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