Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the reason for the error "Device supports x86, but APK only supports armeabi-v7a"

I am playing around with Android Studio by testing some projects out from GitHub and when I try to emulate the apk, it does not let me choose an emulator.

It tells me:

Device supports x86, but APK only supports armeabi-v7a

Why does it do this?

like image 200
Alexander Ibarra Avatar asked Jan 21 '17 05:01

Alexander Ibarra


4 Answers

I had the same problem, I checkout the build.gradle from module:app. It turns out that there's a such config:

    ndk {
        abiFilters "armeabi-v7a", "x86"
    }

when I commented all out, everything worked fine.

I was trying to deal with the React Native Android project.

like image 151
Bruce Lee Avatar answered Nov 15 '22 11:11

Bruce Lee


Turn off USB debugging and turn it back on the hardware device.

like image 40
Nick Avatar answered Nov 15 '22 10:11

Nick


In Android Studio, select the Build menu,

enter image description here

then click Select Build Variant... and in 'Build Variants' window select x86Debug(or release)

enter image description here

PS: Im using Android Studio 2.3 on Mac

like image 46
rafahoro Avatar answered Nov 15 '22 09:11

rafahoro


On Linux: File > Invalidate Cache / Restart On phone: Instead Charge this device change to Transfer photos (PTP)

like image 16
rudicjovan Avatar answered Nov 15 '22 09:11

rudicjovan