I want to use android studio integration with ndkbuild.
My "native" part of project build only for armeabi-v7a-hard and x86,
and all works fine if I just run ndk-build
in jni directory.
I have proper lines in Application.mk
:
APP_ABI := armeabi-v7a-hard x86
To integration project into android studio I added such lines into build.gradle
:
externalNativeBuild {
ndkBuild {
path 'src/lib/jni/Android.mk'
}
}
But for some reason gradle build
try build native code with APP_ABI=armeabi
and failed, because of my code can only be build with armeabi-v7a-hard
.
So how can I tell gradle to build my code only for armeabi-v7a-hard
and x86
,
or just not ignore APP_ABI
line from Application.mk
?
I try such variant:
defaultConfig {
ndk {
abiFilters 'x86', 'armeabi-v7a-hard'
}
}
but gradle
failed with such message:
ABIs [armeabi-v7a-hard] are not available for platform and will be excluded from building and packaging. Available ABIs are [armeabi, armeabi-v7a, arm64-v8a, x86, x86_64, mips, mips64].
Note, that I use ndk 10, not last one (ndk 13), where there is armeabi-v7a-hard
, and ndk.dir
in local.properties
to right value.