天天看點

cocos2dx android版本移植時的Error format not a string literal and no format arguments解決方案

cocos2dx 跨平台開發, 移植Android版本時, 當進行到build_native.sh步驟後出錯:

ndk版本: android-ndk-r9

開發環境: win7 64bit, Android+Eclipse

CCCommon.cpp:54:77: error: format not a string literal and no format arguments [-Werror=format-security]

原因:android-ndk-r9與Eclipse的版本不相容問題

方案之一(我搜到的):

  在對應項目的proj.android/jni/Application.mk添加一句話

  APP_CFLAGS += -Wno-error=format-security

  意思就是無視這個error

轉自 http://www.cnblogs.com/hhuang2012/p/3336911.html