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 han
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.
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'
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
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', 'x86_64', 'armeabi', 'armeabi-v7a', 'mips', 'mips64', 'arm64-v8a'
universalApk true
}
}
Simple Solution. Feel free to comment. Thanks.
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
}
}