解决NDK编译cpp文件出现的-Werror=format-security


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 followingshould be added to Android.mk as a work-around for the quoted error.

"LOCAL_DISABLE_FORMAT_STRING_CHECKS :=true"

然后就好了,感谢国外大神。

猜你喜欢

转载自blog.csdn.net/xuqiqiang1993/article/details/68925843