原文出处
最近编译的时候出现了打印日志时:
char * s = "cainiaobuhuifei";
LOGI(s);
报:error: format not a string literal and no format arguments [-Werror=format-security]
从上面那个网站找到了解决方法为:
as of Android NDK revision 9, the following should be added to Android.mk as a work-around for the quoted error.
"LOCAL_DISABLE_FORMAT_STRING_CHECKS := true"
"LOCAL_DISABLE_FORMAT_STRING_CHECKS := true"
然后就好了,感谢国外大神。
文章详细介绍了如何解决Android NDK版本9及以上出现的打印日志错误,通过在Android.mk文件中添加LOCAL_DISABLE_FORMAT_STRING_CHECKS:=true来修复问题,感谢国外大神提供的解决方案。
4321

被折叠的 条评论
为什么被折叠?



