生成apk文件遇到的编译问题error: format not a string literal and no format arguments

编译错误时使用的android-ndk为r9的版本号。报下面错误:

"Compile++ thumb  : cocosdenshion_static <= SimpleAudioEngine.cpp"
"/Users/linyou/Documents/cocos2d-x/F10Attack/proj.android/../../CocosDenshion/android/SimpleAudioEngine.cpp: In constructor 'CocosDenshion::SimpleAudioEngine::SimpleAudioEngine()':

/Users/linyou/Documents/cocos2d-x/F10Attack/proj.android/../../CocosDenshion/android/SimpleAudioEngine.cpp:77:2: error: format not a string literal and no format arguments [-Werror=format-security]"
"cc1plus: some warnings being treated as errors"


原因是r9版本号的问题,换成r8版本号的就OK了


posted @ 2017-06-21 13:01  yfceshi  阅读(724)  评论(0编辑  收藏  举报