问题
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]
回答1:
July 25, 2019 :
I was facing this issue in Android Studio 3.0.1 :
After checking lots of posts, here is Fix which works:
Go to module build.gradle and within Android block add this script:
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a', 'x86_64'
universalApk true
}
}
Simple Solution. Feel free to comment. Thanks.
回答2:
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
}
}
回答3:
I faced same problem in emulator, but I solved it like this:
Create new emulator with x86_64 system image(ABI)
select device
select x86_64
That's it.
This error indicates the system(Device) not capable for run the application.
I hope this is helpful to someone.
回答4:
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'
}
}
}
回答5:
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.
回答6:
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
回答7:
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"
}
}
回答8:
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
来源:https://stackoverflow.com/questions/36414219/install-failed-no-matching-abis-failed-to-extract-native-libraries-res-113