Issue
My Android Studio app uses OpenCV and the NDK. The apk was too big so I decided that I do not want to support x86 devices (I only want to support armeabi-v7a and arm64-v8a), so support for the x86 ABI was removed by the C++ developer and he is no longer available. In my app gradle I have:
abiFilters 'armeabi-v7a', 'arm64-v8a'
However, now, the app will run on a fine on a Google Pixel real device (or a real device), but not on the Google Pixel emulator (or any emulator). The build for the emulator fails with the message:
Cannot build for ABI: x86 supported ABIs are: armeabi-v7a, arm64-v8a
I cannot understand how it can run fine on the real device, but not on the "same" device run with the AVD. How do I fix this so that the app will run on an emulator also?
Solution
Because the emulator is on a PC. 99.9999% of PCs are x86 devices. When you dropped support for x86, you dropped support for the emulator. Readd x86 support to fix it.
You might be able to find something that does a full simulation of an ARM CPU and run Android on it, but expect it to perform at about 1/10th the speed. We lived through that in the early Android days, and most people didn't bother with a simulator it was so bad (they tested on real device only).
Answered By - Gabe Sechan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.