Reputation: 1323
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?
Upvotes: 118
Views: 84509
Reputation: 391
This issue got in my emulators. I have created new and the issue persists.
I am using studio in Mac. I did not shutdown/restart my machine since a week. May be memory issue of the emulators while booting. I don't know but gave a try to shutdown and open studio and then no warnings. Build is successful.
Note: This may not be the solution but worked for me.
Upvotes: 0
Reputation: 710
The code below worked for me:
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86'
}
Upvotes: 13
Reputation: 420
i see this
If you’re using CMake for your builds, then check the file \proj.android\gradle.properties, and update the PROP_APP_ABI to include the builds for x86, or alternatively, you could just use the armeabi-v7a or arm64-v8a Android images.
Example: PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
If you’re not using cmake, then look in \proj.android\app\jni\Application.mk in case you need to change the ABI setting in there.
Upvotes: 0
Reputation: 21
Try enabling Unknown Sources from Security Options. It worked for me.
Upvotes: 0
Reputation: 53
It happened to me to after updating the Android Studio. In my case, it happened because of the build setting is not automatically configured into x86Debug-x86. Just change it by opening Build>>Select Build Variant>> Change the build variant option from armeabi-v7a into x86Debug-x86 or whatever you need in the emulator.
Upvotes: 0
Reputation: 12583
You need to reconnect your device and try to turn off/on the developer options.
See Enable developer options and debugging
Upvotes: 8
Reputation: 308
In my case my app use some native libraries. Each platform requires the corresponding libs to be built.
So the native lib of x86(or any other) platform is not generated.You must have add an abifilter somewhere:
There are several places where abi filters can be specified:
Application.mk add the platform you need like this:
APP_ABI := armeabi armeabi-v7a x86
build.gradle
find abiFilters, and add platform you need like this:
abiFilters "armeabi","armeabi-v7a","x86"
Upvotes: 8
Reputation: 31
If you use Ubuntu:
Upvotes: 2
Reputation: 1460
adb kill-server
adb start-server
Its working for me on windows OS.
Upvotes: 1
Reputation: 3114
Running an AVD using the x86 processor is 10x faster than using the ARM emulator, but most of the time you are only compiling your APK for ARM. To have faster emulation runs using an x86 AVD I had to do the following (for a Cocos2d-x project):
app/jni/Android.mk
APP_ABI := armeabi-v7a:x86
gradle.properties
PROP_APP_ABI=armeabi-v7a:x86
app/build.gradle
android {
...
defaultConfig {
...
ndk {
abiFilters = []
abiFilters.addAll(PROP_APP_ABI.split(':').collect{it as String})
}
}
}
Upvotes: 0
Reputation: 693
In my case of Linux machine adb devices
showed
List of devices attached
44b194f5 no permissions
Then restarted the adb server
sudo adb kill-server
and then
sudo adb start-server
then connect your device turn Debugging on and type
adb devices
List of devices attached
44b194f5 device
Finally was able to run on the device
Upvotes: 9
Reputation: 181
For me it worked my changing the cable option from
-> Charge Only.
To
-> Transfer file.
Upvotes: 5
Reputation: 1692
Many times this means that you have not granted your laptop/computer access to your device. Take a look at your device and click the "Allow Access" button as well as the debugging permissions.
Upvotes: 0
Reputation: 95
Can confirm, toggling USB debugging off/on in Developer Options resolved the issue. Maybe even cancel the "Select Deployment Target" window in Android Studio and try to run the app again after toggling USB debugging.
Upvotes: 6
Reputation: 2483
On my physical device, I started getting this. The fix was to go into Developer Settings and turn off and on USB debugging.
Upvotes: 2
Reputation: 5753
Just go to device Settings >> Developer Options >> Restore Default Settings
then enable USB debugging
Upvotes: 4
Reputation: 4441
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.
Upvotes: 111
Reputation: 791
I had the similar issue and I've resolved it by adding "x86" value to the "abiFilters" list like below -
[Open build.gradle(Module: app) file ] and search for "ndk" in deafultSection and add "x86" to it!
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86"
}
Hope it helps!!!
Upvotes: 12
Reputation: 1257
In Android Studio, select the Build menu,
then click Select Build Variant... and in 'Build Variants' window select x86Debug(or release)
PS: Im using Android Studio 2.3 on Mac
Upvotes: 50
Reputation: 313
On Linux: File > Invalidate Cache / Restart On phone: Instead Charge this device change to Transfer photos (PTP)
Upvotes: 17
Reputation: 191884
Device supports x86, but APK only supports armeabi-v7a)
Sounds like you used an x86
image in the emulator.
Create a separate one. Choose "other images" tab to find arm devices, if you have to.
Or, run on an actual device. The repo you listed is meant to run on a Raspberry Pi 3 / ODroid, I think.
Upvotes: 6
Reputation: 400
Test your code on real phone. If you have still same issue,then import your code again and before this you should update your SDK and create a new emulator with ARM system image.
Upvotes: 0