错误信息:
C:/cocos2d-x-2.1.4/testing/proj.android/../../cocos2dx/platform/android/CCCommon.cpp: In function ‘void cocos2d::CCLog(char const*, …)’:
C:/cocos2d-x-2.1.4/testing/proj.android/../../cocos2dx/platform/android/CCCommon.cpp:44:72: error: format not a string literal and no format arguments [-Werror= format-security]
C:/cocos2d-x-2.1.4/testing/proj.android/../../cocos2dx/platform/android/CCCommon.cpp: In function ‘void cocos2d::CCLuaLog(char const*)’:
C:/cocos2d-x-2.1.4/testing/proj.android/../../cocos2dx/platform/android/CCCommon.cpp:54:77: error: format not a string literal and no format arguments [-Werror= format-security]
解决办法:
找到ndk安装目录下的android-ndk-r9/build/core/default-build-commands.mk文件,把里面两个地方的**-Werror=format-security** 删除掉,或者简单的在前面加个#注释掉就行
原文地址: http://www.cocos2d-x.org/forums/6/topics/32437?r=32447