Solution :
Please make the splits depending on the same list of abis as the external build. It is the Single source of truth as follows:
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
OR
After doing some more research I understood that the path where located my libs is right. I just need to add following folders for different architectures:
· ARM EABI v7a System Image
· Intel x86 Atom System Image
· MIPS System Image
· Google APIs
OR
Following solution worked for me when added 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 follow the solutions then you will be able to resolve your issue.