format not a string literal and no format arguments [-Werror=format-security]

问题:

   在使用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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章