“CocosDenshion / android / SimpleAudioEngine”出错

时间:2013-08-16 17:26:13

标签: android android-ndk cocos2d-x

我正在尝试创建一个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
你能帮帮我吗?谢谢!

2 个答案:

答案 0 :(得分:1)

哈哈,没有人知道解决方案。今天,我已经得到了解决方案。 NDK r9是构建器,makelog代码将是ERROR。也许cocos2dx团队没有注意到它。想要解决它,只需删除它。

答案 1 :(得分:1)

您可以避免编辑配置文件

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

将其添加到编译器标志

APP_CFLAGS += -Wno-error=format-security

因此,您不会因此类警告而导致错误。