Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The currently selected variant "arm-debug" uses split APKs, but none of the 4 split apks are compatible with the current device

I have imported the project from https://github.com/DrKLO/Telegram. I have generated the signed APK and when I try to run in the emulator it shows the following error.

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

How can I fix this error ?

Thanks!

like image 591
JesanSD Avatar asked May 15 '16 11:05

JesanSD


3 Answers

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!

like image 148
ThomsonStan Avatar answered Oct 20 '22 13:10

ThomsonStan


You can try to restart the android studio, and then reconnect the device

like image 32
尹振东 Avatar answered Oct 20 '22 12:10

尹振东


The problem is Genymotion uses x86 instead of arm architecture, and doesn't seem to come with libhoudini (arm to x86 translator) pre-installed.

You have two options:

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

Best of luck!

like image 37
Payam Avatar answered Oct 20 '22 12:10

Payam