I have a native library that I am trying to build with gradle. If I call the ndk-build command from the gradle file, I can create my own library. But if I try to use the ndk build function built into the android gradle plugin, I cannot build.
I get fatal error: android_native_app_glue.h: No such file or directory
The corresponding section of the gradle file is:
buildTypes.debug.jniDebugBuild true
defaultConfig {
ndk {
moduleName 'myModule'
stl 'gnustl_static'
cFlags '-UNDEBUG -Werror -Wunused-variable -Wunused-but-set-parameter -Wtype-limits -Wmissing-field-initializers -Wreturn-type -Wuninitialized'
ldLibs 'log', 'GLESv2'
}
productFlavors {
armv7{
ndk {
abiFilter 'armeabi-v7a'
}
}
}
}
Is there a way to tell ndk to build where to find the android_native_app_glue.h file?
On a side note, is there a way to pass the verbose flag to ndk-build, equivalent ndk-build V=1?
source
share