Try using the abiFilter
property in your build.gradle.
This post explains how to use native libraries in different architectures:
In Chapter Building one APK per architecture, and doing it well! it says:
Use flavors to build one APK per architecture really easily, by using abiFilter
property.
Try adding this to your gradle.build:
android{
...
productFlavors {
x86 {
ndk {
abiFilter "x86"
}
}
mips {
ndk {
abiFilter "mips"
}
}
armv7 {
ndk {
abiFilter "armeabi-v7a"
}
}
arm {
ndk {
abiFilter "armeabi"
}
}
fat
}
}
You might just need the arm
& x86
.
After this, synchronize the project with the gradle file using
Tools > Android > Sync Project with Gradle Files
Now you should be able to switch between build variants and one APK by architecture should be generated.
Select Build Variants
in the lower left corner. You should be able to switch between the different architectures in the Build Variant dropdown.
Hope this helps.