問題:
在使用ndk-r9版本的ndk-build命令編譯jni時,報錯error: format not a string literal and no format arguments [-Werror=format-security]
原因: Android-ndk-r9與Eclipse的版本不兼容問題。
解決方案:
在對應項目的jni/Application.mk添加一句話
APP_CFLAGS += -Wno-error=format-security
意思就是忽視這個error