0

我正在尝试创建一个 cocos2d-x-android 演示,但出现了这些错误。

Android NDK: WARNING: APP_PLATFORM android-18 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml  "  
"Android NDK: WARNING:/Users/linyou/Documents/cocos2d-x/F10Attack/proj.android/../../cocos2dx""/Android.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for static libraries    

"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"

"make: *** [obj/local/armeabi/objs/cocosdenshion_static/SimpleAudioEngine.o] Error 1

你能帮助我吗?谢谢!

4

2 回答 2

1

您可以避免这种编辑配置文件

$PROJECT_HOME/proj.android/jni/Application.mk

将此添加到编译器标志

APP_CFLAGS += -Wno-error=format-security

所以你不会得到由那种警告引起的错误。

于 2014-09-24T22:49:44.323 回答
1

哈哈,没有人知道解决方案。今天,我得到了解决方案。NDK r9 是构建器,makelog 代码将是 ERRORs。可能cocos2dx团队没有注意到,想修复,删掉。

于 2013-08-17T20:35:22.177 回答