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