I have this native library that only works on certain devices (armeabi, armeabi-v7a). It provides support for a custom HW module. I detect and enable this library in java code based on the device that actually supports it. There are no issues on arm devices that do not provide this custom HW.
However, if I try to install my apk to an x86 device (or emulator), installation will fail with INSTALL_FAILED_NO_MATCHING_ABIS
.
How can I link the library into the app that would avoid the reported error? I don't care if it's an ugly hack, as long as the app installs and starts.
The device checks the content of libs
directory in the APK which is (in default Gradle configuration) copied from src/main/jniLibs
. If there are subdirectories and none of them is x86
, it will report this error. The easy solution here is to create subdirectory x86
with some dummy file.