本地编译ijkplayer, 需要调试ndk, 按照`0003-armv7a-enable-debugging-with-LLDB.patch`所说进行修改. 但是运行时提示: ndk missing -D__STDC_CONSTANT_MACROS / #define __STDC_CONSTANT_MACROS 查找了一番, 没有找到直接的答案. 通过提示知道需要给cpp增加一个标识, 按照如下这样在gradle的 cppFlags 增加 "-D__STDC_CONSTANT_MACROS"即可. defaultConfig { minSdkVersion 14 targetSdkVersion rootProject.ext.targetSdkVersion externalNativeBuild { ndkBuild { arguments "NDK_APPLICATION_MK:=src/main/jni/Application.mk"//,"APP_ABI=armeabi-v7a","NDK_ALL_ABIS=armeabi-v7a"//,"NDK_LIBS_OUT:=src/main/libs" cFlags "-DTEST_C_FLAG1", "-DTEST_C_FLAG2" // output dir -> 'src/main/libs' cppFlags "-DTEST_CPP_FLAG2", "-DTEST_CPP_FLAG2", "-D__STDC_CONSTANT_MACROS" abiFilters "armeabi" } } }