当我尝试构建cocos2dX代码时,我收到以下错误。
./ build_native.sh NDK_ROOT = / Users / Marine / Documents / android-ndk-r10e COCOS2DX_ROOT = /Users/Marine/Documents/Cocos2dXReq/cocos2d-x-2.2.6 APP_ROOT = /Volumes/Data/NewData/Projects/SpikesProj/SourceCode/cocos2d-x-2.2.6/projects/DTS/proj.android/ .. APP_ANDROID_ROOT = /Volumes/Data/NewData/Projects/SpikesProj/SourceCode/cocos2d-x-2.2.6/projects/DTS/proj.android marine使用预构建的外部c => ./Users/Marine/Documents/Cocos2dXReq/cocos2d-x-2.2.6 Android NDK: 警告:/Users/Marine/Documents/Cocos2dXReq/cocos2d-x-2.2.6/cocos2dx/Android.mk:cocos2dx_static: 静态库make:Entering始终忽略LOCAL_LDLIBS 目录
/Volumes/Data/NewData/Projects/SpikesProj/SourceCode/cocos2d-x-2.2.6/projects/DTS/proj.android' [armeabi] Compile++ thumb: cocos2dcpp_shared <= main.cpp [armeabi] Compile++ thumb: cocos2dcpp_shared <= AppDelegate.cpp [armeabi] Compile++ thumb: cocos2dcpp_shared <= HelloWorldScene.cpp jni/../../Classes/HelloWorldScene.cpp: In member function 'void HelloWorld::checkAch()': jni/../../Classes/HelloWorldScene.cpp:873:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/用户/ Bilalmirza /文档/开发工具/ cocos2d的-X-2.2.3 /扩展/ AssetsManager / AssetsManager.cpp&#39 ;, 需要的
ThirdPartyInterface::reportAchievement("com.ach.id.10", 100); ^ jni/../../Classes/HelloWorldScene.cpp:877:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.id.20", 100); ^ jni/../../Classes/HelloWorldScene.cpp:881:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.id.30", 100); ^ jni/../../Classes/HelloWorldScene.cpp:885:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.id.40", 100); ^ jni/../../Classes/HelloWorldScene.cpp:889:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.id.50", 100); ^ jni/../../Classes/HelloWorldScene.cpp:893:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.id.60", 100); ^ jni/../../Classes/HelloWorldScene.cpp:897:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.id.70", 100); ^ jni/../../Classes/HelloWorldScene.cpp:901:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.id.80", 100); ^ jni/../../Classes/HelloWorldScene.cpp:905:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.id.90", 100); ^ jni/../../Classes/HelloWorldScene.cpp:909:63: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.id.100", 100); ^ jni/../../Classes/HelloWorldScene.cpp:913:63: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.id.150", 100); ^ jni/../../Classes/HelloWorldScene.cpp:917:63: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.id.200", 100); ^ jni/../../Classes/HelloWorldScene.cpp:922:65: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.played.5", 100); ^ jni/../../Classes/HelloWorldScene.cpp:926:65: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.played.5", 100); ^ jni/../../Classes/HelloWorldScene.cpp:930:65: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.played.5", 100); ^ jni/../../Classes/HelloWorldScene.cpp:934:65: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.played.5", 100); ^ jni/../../Classes/HelloWorldScene.cpp:938:65: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.played.5", 100); ^ jni/../../Classes/HelloWorldScene.cpp:942:65: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.played.5", 100); ^ jni/../../Classes/HelloWorldScene.cpp:946:65: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
ThirdPartyInterface::reportAchievement("com.ach.played.5", 100); ^ [armeabi] Compile++ thumb: cocos2dcpp_shared <= ThirdPartyInterface.cpp [armeabi] Compile++ thumb: cocos2dcpp_shared <= CollisionDetection.cpp [armeabi] Compile++ thumb: cocos2dcpp_shared <= Shared.cpp [armeabi] Compile++ thumb: cocos2dcpp_shared <= JNIHelpers.cpp [armeabi] Compile++ thumb: cocos2dcpp_shared <= NativeUtils.cpp make: *** No rule to make targetobj/local/armeabi/objs/cocos_extension_static/AssetsManager/AssetsManager.o'. Stop. make: Leaving directory
/卷/数据/ NewData /项目/ SpikesProj /源码/ cocos2d的-X-2.2.6 /项目/ DTS / proj.android&#39; Mac-mini:proj.android Marine $ ant debug install Buildfile: /Volumes/Data/NewData/Projects/SpikesProj/SourceCode/cocos2d-x-2.2.6/projects/DTS/proj.android/build.xml建立失败
因为我是cocos2D-x的新手任何帮助都将受到高度赞赏。
非常感谢!
答案 0 :(得分:0)
我看到你使用ndk10。它建议将ndk9与cocos2d-x一起使用。试一试。