Error format not a string literal and no format arguments解决方案

原地址:

http://blog.csdn.net/joeblackzqq/article/details/25985299

cData.cpp:355:30:error:format not a string literal and no fomat arguments [-Werror=format-security]
cData.cpp:387:42:error:format not a string literal and no fomat arguments [-Werror=format-security]
cc1plus.exe:some warnings being treated as errors

原因:

  android-ndk-r9与Eclipse的版本不兼容问题

方案之一(我搜到的):

  在对应项目的proj.android/jni/Application.mk添加一句话

  APP_CFLAGS += -Wno-error=format-security

  意思就是无视这个error

可以解决编译出错问题, 如有更好方案, 请不吝赐教.

原文地址:https://www.cnblogs.com/123ing/p/3902480.html