您的位置:首页 > 移动开发 > Android开发

Android ndk报错error: format not a string literal and no format arguments [-Werror=format-security]

2016-04-21 09:12 615 查看
问题:

   在使用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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: