在jni外头的Application.mk中,
加入
###FIX :error: format not a string literal and no format arguments [-Werror=format-security]
APP_CFLAGS += -Wno-error=format-security
================
有人说要去修改NDK:
http://www.aiseminar.cn/bbs/home.php?mod=space&uid=3&do=blog&id=2733
修改方法为:在android-ndk-r9/build/core/default-build-commands.mk中,找到 -Werror=format-security,注释掉就可以了。
=================这样就可以忽略: 塔机配件大全
参考:
http://blog.csdn.net/whu_zhangmin/article/details/28890025
问题:
在使用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