使用cocos2dx 13 编译Android版本出错

使用cocos2d-x 13创建一个HelloCC,然后 compile win32没有问题, 在编译compile android 就报错了,纠结了一天了,哪位大神给看看。

C:\Users\fan>cd /d E:\Game\HelloCC

E:\Game\HelloCC>cocos.py compile -p android
编译模式:debug
使用 Eclipse 工程:E:\Game\HelloCC\proj.android
未指定 Android 目标平台版本,自动查找一个可用版本…
正在执行:’“D:\IDE\Android\Android32\sdk\tools\android” update project -t android-15 -p E:\Game\HelloCC\proj.android’

Updated project.properties
Updated local.properties
Updated file E:\Game\HelloCC\proj.android\proguard-project.txt
未指定 Android 目标平台版本,自动查找一个可用版本…
正在执行:’“D:\IDE\Android\Android32\sdk\tools\android” update lib-project -p E:\Game\HelloCC\cocos2d\cocos\platform\android\java -t android-15’

Updated project.properties
Updated local.properties
Updated file E:\Game\HelloCC\cocos2d\cocos\platform\android\java\proguard-project.txt
正在执行 ndk-build…
NDK 编译模式:debug
正在执行:’“E:\Game_Dev\android-ndk-r12b\ndk-build” -C E:\Game\HelloCC\proj.android -j4 NDK_MODULE_PATH=E:\Game\HelloCC\proj.android…/cocos2d;E:\Game\HelloCC\proj.android…/cocos2d/cocos;E:\Game\HelloCC\proj.android…/cocos2d/external NDK_TOOLCHAIN_VERSION=4.9 NDK_DEBUG=1’

Android NDK: WARNING: APP_PLATFORM android-15 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml
make: Entering directory E:/Game/HelloCC/proj.android' [armeabi] "Gdbserver ": "[arm-linux-androideabi-4.9] libs/armeabi/gdbserver" [armeabi] "Gdbsetup ": "libs/armeabi/gdb.setup" [armeabi] "Compile++ thumb": "MyGame_shared <= main.cpp" [armeabi] "Compile++ thumb": "MyGame_shared <= AppDelegate.cpp" process_begin: CreateProcess(NULL, E:/Game_Dev/android-ndk-r12b/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -MMD -MP -MF ./obj/local/armeabi/objs-debug/MyGame_shared/hellocpp/main.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -g -march=armv5te -mtune=xscale -msoft-float -fno-exceptions -fno-rtti -mthumb -O0 -UNDEBUG -Ijni/../../Classes -IE:/Game_Dev/android-ndk-r12b/build//../sources/cxx-stl/gnu-libstdc++/4.9/include -IE:/Game_Dev/android-ndk-r12b/build//../sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -IE:/Game_Dev/android-ndk-r12b/build//../sources/cxx-stl/gnu-libstdc++/4.9/include/backward -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/editor-support/cocostudio/.. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/editor-support/cocosbuilder/.. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/3d/.. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/editor-support/spine/.. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/network -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/audio/android/../include -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/ui/../editor-support -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/audio/android/../include -IE:/Game/HelloCC/proj.android/../cocos2d/external/flatbuffers/.. -IE:/Game/HelloCC/proj.android/../cocos2d/extensions/. -IE:/Game/HelloCC/proj.android/../cocos2d/extensions/.. -IE:/Game/HelloCC/proj.android/../cocos2d/extensions/GUI/CCControlExtension -IE:/Game/HelloCC/proj.android/../cocos2d/extensions/GUI/CCScrollView -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./.. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/tinyxml2 -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/unzip -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/chipmunk/include/chipmunk -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/xxhash -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/nslog -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/poly2tri -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/poly2tri/common -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/poly2tri/sweep -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/clipper -IE:/Game/HelloCC/proj.android/../cocos2d/external/websockets/prebuilt/android/../../include/android -IE:/Game/HelloCC/proj.android/../cocos2d/external/Box2D/.. -IE:/Game/HelloCC/proj.android/../cocos2d/external/bullet/.. -IE:/Game/HelloCC/proj.android/../cocos2d/external/freetype2/prebuilt/android/../../include/android -IE:/Game/HelloCC/proj.android/../cocos2d/external/freetype2/prebuilt/android/../../include/android/freetype2 -IE:/Game/HelloCC/proj.android/../cocos2d/external/png/prebuilt/android/../../include/android -IE:/Game/HelloCC/proj.android/../cocos2d/external/jpeg/prebuilt/android/../../include/android -IE:/Game/HelloCC/proj.android/../cocos2d/external/tiff/prebuilt/android/../../include/android -IE:/Game/HelloCC/proj.android/../cocos2d/external/webp/prebuilt/android/../../include/android -IE:/Game/HelloCC/proj.android/../cocos2d/external/chipmunk/prebuilt/android/../../include -IE:/Game/HelloCC/proj.android/../cocos2d/external/zlib/prebuilt/android/../../include -IE:/Game/HelloCC/proj.android/../cocos2d/external/recast/.. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/platform/android -IE:/Game_Dev/android-ndk-r12b/build//../sources/android/cpufeatures -Ijni -DANDROID -DUSE_FILE32API -Wa,--noexecstack -Wformat -Werror=format-security -Wno-deprecated-declarations -D__STDC_LIMIT_MACROS=1 -fexceptions -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char -DCOCOS2D_DEBUG=1 -isystem E:/Game_Dev/android-ndk-r12b/build//../platforms/android-15/arch-arm/usr/include -c jni/hellocpp/main.cpp -o ./obj/local/armeabi/objs-debug/MyGame_shared/hellocpp/main.o, ...) failed. make (e=2): make: *** [obj/local/armeabi/objs-debug/MyGame_shared/hellocpp/main.o] Error 2 make: *** Waiting for unfinished jobs.... process_begin: CreateProcess(NULL, E:/Game_Dev/android-ndk-r12b/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -MMD -MP -MF ./obj/local/armeabi/objs-debug/MyGame_shared/__/__/Classes/AppDelegate.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -g -march=armv5te -mtune=xscale -msoft-float -fno-exceptions -fno-rtti -mthumb -O0 -UNDEBUG -Ijni/../../Classes -IE:/Game_Dev/android-ndk-r12b/build//../sources/cxx-stl/gnu-libstdc++/4.9/include -IE:/Game_Dev/android-ndk-r12b/build//../sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -IE:/Game_Dev/android-ndk-r12b/build//../sources/cxx-stl/gnu-libstdc++/4.9/include/backward -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/editor-support/cocostudio/.. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/editor-support/cocosbuilder/.. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/3d/.. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/editor-support/spine/.. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/network -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/audio/android/../include -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/ui/../editor-support -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/audio/android/../include -IE:/Game/HelloCC/proj.android/../cocos2d/external/flatbuffers/.. -IE:/Game/HelloCC/proj.android/../cocos2d/extensions/. -IE:/Game/HelloCC/proj.android/../cocos2d/extensions/.. -IE:/Game/HelloCC/proj.android/../cocos2d/extensions/GUI/CCControlExtension -IE:/Game/HelloCC/proj.android/../cocos2d/extensions/GUI/CCScrollView -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./.. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/tinyxml2 -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/unzip -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/chipmunk/include/chipmunk -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/xxhash -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/nslog -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/poly2tri -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/poly2tri/common -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/poly2tri/sweep -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/./../external/clipper -IE:/Game/HelloCC/proj.android/../cocos2d/external/websockets/prebuilt/android/../../include/android -IE:/Game/HelloCC/proj.android/../cocos2d/external/Box2D/.. -IE:/Game/HelloCC/proj.android/../cocos2d/external/bullet/.. -IE:/Game/HelloCC/proj.android/../cocos2d/external/freetype2/prebuilt/android/../../include/android -IE:/Game/HelloCC/proj.android/../cocos2d/external/freetype2/prebuilt/android/../../include/android/freetype2 -IE:/Game/HelloCC/proj.android/../cocos2d/external/png/prebuilt/android/../../include/android -IE:/Game/HelloCC/proj.android/../cocos2d/external/jpeg/prebuilt/android/../../include/android -IE:/Game/HelloCC/proj.android/../cocos2d/external/tiff/prebuilt/android/../../include/android -IE:/Game/HelloCC/proj.android/../cocos2d/external/webp/prebuilt/android/../../include/android -IE:/Game/HelloCC/proj.android/../cocos2d/external/chipmunk/prebuilt/android/../../include -IE:/Game/HelloCC/proj.android/../cocos2d/external/zlib/prebuilt/android/../../include -IE:/Game/HelloCC/proj.android/../cocos2d/external/recast/.. -IE:/Game/HelloCC/proj.android/../cocos2d/cocos/platform/android -IE:/Game_Dev/android-ndk-r12b/build//../sources/android/cpufeatures -Ijni -DANDROID -DUSE_FILE32API -Wa,--noexecstack -Wformat -Werror=format-security -Wno-deprecated-declarations -D__STDC_LIMIT_MACROS=1 -fexceptions -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char -DCOCOS2D_DEBUG=1 -isystem E:/Game_Dev/android-ndk-r12b/build//../platforms/android-15/arch-arm/usr/include -c jni/../../Classes/AppDelegate.cpp -o ./obj/local/armeabi/objs-debug/MyGame_shared/__/__/Classes/AppDelegate.o, ...) failed. make (e=2): make: *** [obj/local/armeabi/objs-debug/MyGame_shared/__/__/Classes/AppDelegate.o] Error 2 make: Leaving directory E:/Game/HelloCC/proj.android’
执行命令出错,返回值:2。

同楼主编译遇到问题,版本升级编译都变了,cocos2dx真伤

我猜测是ndk版本不对,或者环境没设置好

我的报错:
python D:/CC_project/projects3131/Test/proj.android/build_native.py -b release all
python: can’t open file ‘D:/CC_project/projects3131/Test/proj.android/build_native.py’: [Errno 2] No such file or directory

求解

官方都没有 一个指导版本配置,让新手 怎么入手,本来看网站升级了,发现 文档还是原来的文档。cocos这么不重视 开发者,一心想搞软件,要是少了开发者 又有什么用,还不是成了空中楼阁。现在VR这么火,Unity3D越来越有市场,现在都想不用cocos了,在牛逼的引擎也得有人用,明明可以花很少的时间 精力可以做好的事情 就是不去做,说白了就是傲慢,你牛逼,你格调高。

新版本的 都没有这个build_native.py 官方要我们用 cocos compile -p android编译

你的是ndk版本不对吧,换成r10e试试

你的可以参考 http://forum.cocos.com/t/build-native-py/37852