I have an issue with third party libraries that are imported to my project.
I read quite a lot of articles about that but do not get any information how properly handle it.
I put my classes .so to the folder.
Problem is that the i try to run the app i receive
[INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
This question is related to
android
android-ndk
My app was running on Nexus 5X API 26 x86 (virtual device on emulator) without any errors and then I included a third party AAR. Then it keeps giving this error. I cleaned, rebuilt, checked/unchecked instant run option, wiped the data in AVD, performed cold boot but problem insists. Then I tried the solution found here. he/she says that add splits & abi blocks for 'x86', 'armeabi-v7a' in to module build.gradle file and hallelujah it is clean and fresh again :)
Edit: On this post Driss Bounouar's solution seems to be same. But my emulator was x86 before adding the new AAR and HAXM emulator was already working.
13 September 2018 It worked for me when add more types and set universalApk with false to reduce apk size
splits {
abi {
enable true
reset()
include 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'mips', 'mips64', 'arm64-v8a'
universalApk false
}
}
If you got this error when working with your flutter project, you can add the following code in the module build.gradle
and within Android block
and then in the defaultConfig
block. This error happened when I was trying to make a flutter apk build.
android{
...
defaultConfig{
...
//Add this ndk block of code to your build.gradle
ndk {
abiFilters 'armeabi-v7a', 'x86', 'armeabi'
}
}
}
After some time i investigate and understand that path were located my libs is right. I just need to add folders for different architectures:
ARM EABI v7a System Image
Intel x86 Atom System Image
MIPS System Image
Google APIs
Make the splits depend on the same list of abis as the external build. Single source of truth.
android {
// ...
defaultConfig {
// ...
externalNativeBuild {
cmake {
cppFlags "-std=c++17"
abiFilters 'x86', 'armeabi-v7a', 'x86_64'
}
}
} //defaultConfig
splits {
abi {
enable true
reset()
include defaultConfig.externalNativeBuild.getCmake().getAbiFilters().toListString()
universalApk true
}
}
} //android
Doing flutter clean
actually worked for me
This is caused by a gradle dependency on some out-of-date thing which causes the error. Remove gradle dependencies until the error stops appearing. For me, it was:
implementation 'org.apache.directory.studio:org.apache.commons.io:2.4'
This line needed to be updated to a newer version such as:
api group: 'commons-io', name: 'commons-io', version: '2.6'
Android 9 and Android 11 emulators have support for arm binaries.
I had the same issue while using x86 emulator with API level 29, trying to install an apk targeting arm ABI.
I tried x86 emulator with API level 30 and it worked fine.
I faced same problem in emulator, but I solved it like this:
Create new emulator with x86_64 system image(ABI)
That's it.
This error indicates the system(Device) not capable for run the application.
I hope this is helpful to someone.
Anyone facing this while using cmake build, the solution is to make sure you have included the four supported platforms in your app module's android{} block:
externalNativeBuild {
cmake {
cppFlags "-std=c++14"
abiFilters "arm64-v8a", "x86", "armeabi-v7a", "x86_64"
}
}
Source: Stackoverflow.com