当前选择的变体“arm-debug”使用拆分APK,但4个拆分apk中没有一个与当前设备兼容

时间:2016-05-15 11:48:57

标签: java android android-studio android-emulator telegram

我从https://github.com/DrKLO/Telegram导入了该项目。我已生成已签名的APK,当我尝试在模拟器中运行时,它会显示以下错误。

05/15 17:14:42: Launching TMessagesProj
The currently selected variant "arm-debug" uses split APKs, but none of the 4 split apks are compatible with the current device with density "480" and ABIs "x86".
Error while Installing APK

如何解决此错误?

谢谢!

3 个答案:

答案 0 :(得分:4)

In the TMessagesProj/build.gradle file, right in the defaultConfig section add

ndk {
        abiFilters "x86"
    }

So the defaultConfig section is:

defaultConfig {
    minSdkVersion 14
    targetSdkVersion 23
    versionName "3.10.1"
    ndk {
        abiFilters "x86"
    }
}

Good luck!

答案 1 :(得分:2)

您可以尝试重启android studio,然后重新连接设备

答案 2 :(得分:0)

问题是Genymotion使用x86而不是arm架构,而且似乎没有预先安装libhoudini(arm to x86 translator)。

您有两种选择:

install the native arm translation, which I have never had much luck with, will occasionally crash my devices with no warning, and is the #1 cause of crashes in my app in production - http://mir.cr/0ZIO8PME

OR

Build a native x86 binary of your app. Assuming you are using the most recent Cordova 4.0, this is default with gradle, and you will be able to find an x86 build already done along side the arm build. According to the Cordova release notes, you can manually trigger gradle if it isn't already enabled with:

cordova build android -- --gradle

祝你好运!