2

I am using android studio and I created an emulator(Nexus 5x). When I try to install the apk from android studio, it gives me following error

The currently selected variant "aosp-debug" uses split APKs, but none of the 1 split apks are compatible with the current device with density "400" and ABIs "x86".

Error while Installing APK

After following THIS LINK, I saw that I have correct build variant set and I am still facing this problem.

1 Answer 1

4

I was able to find the answer here: APK SPLIT

All you need to do is to generate an x86 build. You can make this happen by following code:

splits {
    abi {
        enable true
        reset()
        include 'x86', 'armeabi-v7a'
        universalApk false
    }
}

To use emulator run command: gradlew -Px86 assemble. This will create 2 artifacts, one for armeabi-v7a and one for x86. You can use x86 for emulator. Android studio is smart enough to choose the correct one.

Sign up to request clarification or add additional context in comments.

1 Comment

in your build.gradle android{ } block. Use this link for details: tools.android.com/tech-docs/new-build-system/user-guide/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.