How do I add sysroot/usr/include/android/ that is prebuilts/ndk/ to an android.bp that is in external/Helloworld ?
I tried adding it in the android.bp of my external/Helloworld/Android.bp as follows :
cc_library_static {
name: "hello",
include_dirs: [
"../../../prebuilts/ndk/android-ndk-r21b/sysroot/usr/include"
],
srcs: [ "foo.c"
],
host_ldlibs: [
"-L" + "../../../prebuilts/ndk/android-ndk-r21b/sysroot" + "/usr/lib",
],
cflags: [
"foo"
],
static_libs: ["foo"],
vendor: true,
}
However i receive the error that :
error: external/dab/MTK/Android.bp:117:1: module "hello" variant "android_vendor.34_arm64_armv8-a_cortex-a72_static": Path is outside directory: ../../../prebuilts/ndk/android-ndk-r21b/sysroot/usr/include