2

I'm trying to add NDK to my project using externalNativeBuild and I want to set cFlags but It seems that the Flags doesn't work or the NDK doesn't add to project this way. here is my code to add NDK in build.gradle :

externalNativeBuild {
ndkBuild {
    arguments "NDK_APPLICATION_MK:=Application.mk"
    cFlags "-I\$(LOCAL_PATH)/speex/include/ -I\$(LOCAL_PATH)/celt-0.11.0-src/include/ -I\$(LOCAL_PATH)/celt-0.7.0-src/include/ -I\$(LOCAL_PATH)/opus/include -D__EMX__ -DUSE_KISS_FFT -DFIXED_POINT -DEXPORT='' -DHAVE_CONFIG_H -fvisibility=hidden -DOPUS_BUILD -DVAR_ARRAYS -Wno-traditional -DFIXED_POINT"
    abiFilters "armeabi", "armeabi-v7a", "x86"
   }
}

after compiling this logcat give me the error that means it doesn't recognize the c libraries which I want to add by cFlags and if I comment this whole externalNativeBuild block it gives me same error. so anyone knows how i can add this c libraries to my projects?

Shakib Karami
  • 678
  • 1
  • 4
  • 11

0 Answers0