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

Jes*_*nSD 6 java android android-emulator android-studio 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
Run Code Online (Sandbox Code Playgroud)

如何解决此错误?

谢谢!

小智 5

TMessagesProj / build.gradle文件中的defaultConfig“添加” 部分中

ndk {
        abiFilters "x86"
    }
Run Code Online (Sandbox Code Playgroud)

因此,该 defaultConfig部分是:

defaultConfig {
    minSdkVersion 14
    targetSdkVersion 23
    versionName "3.10.1"
    ndk {
        abiFilters "x86"
    }
}
Run Code Online (Sandbox Code Playgroud)

祝好运!


小智 5

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


小智 1

问题是Genymotion使用x86而不是arm架构,并且似乎没有预装libhoudini(arm到x86转换器)。

您有两个选择:

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
Run Code Online (Sandbox Code Playgroud)

或者

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
Run Code Online (Sandbox Code Playgroud)

祝你好运!