我正在尝试创建一个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
你能帮帮我吗?谢谢!
答案 0 :(得分:1)
答案 1 :(得分:1)
您可以避免编辑配置文件
$PROJECT_HOME/proj.android/jni/Application.mk
将其添加到编译器标志
APP_CFLAGS += -Wno-error=format-security
因此,您不会因此类警告而导致错误。