CocosCreator打包失败,报错:执行命令出错,返回值:2
环境:
CocosCreator 1.4.1
Ndk:r14b
日志如下:
编译模式:release
使用 Eclipse 工程:E:\HengShui2client\build\jsb-binary\frameworks\runtime-src\proj.android
正在执行:'"C:\Users\Administrator\Downloads\adt-bundle-windows-x86-20130917.467161976\adt-bundle-windows-x86-20130917\sdk\tools\android" update project -t android-23 -p E:\HengShui2client\build\jsb-binary\frameworks\runtime-src\proj.android'
Updated project.properties
Updated local.properties
Updated file E:\HengShui2client\build\jsb-binary\frameworks\runtime-src\proj.android\proguard-project.txt
It seems that there are sub-projects. If you want to update them
please use the --subprojects parameter.
正在执行 ndk-build...
NDK 编译模式:release
正在执行:'"E:\android-ndk-r14b-windows-x86_64\android-ndk-r14b\ndk-build" -C E:\HengShui2client\build\jsb-binary\frameworks\runtime-src\proj.android -j4 APP_ABI="armeabi armeabi-v7a" NDK_MODULE_PATH=D:/CocosCreator/resources/cocos2d-x;D:/CocosCreator/resources/cocos2d-x/cocos;D:/CocosCreator/resources/cocos2d-x/external;D:/CocosCreator/resources/cocos2d-x/external/android/include;D:/CocosCreator/resources/cocos2d-x/external/android/spidermonkey NDK_TOOLCHAIN_VERSION=4.9'
Android NDK: WARNING: APP_PLATFORM android-23 is larger than android:minSdkVersion 11 in ./AndroidManifest.xml
Android NDK: WARNING: Ignoring unknown import directory: D:/CocosCreator/resources/cocos2d-x/external/android/include
Android NDK: WARNING: Ignoring unknown import directory: D:/CocosCreator/resources/cocos2d-x/external/android/spidermonkey
make: Entering directory `E:/HengShui2client/build/jsb-binary/frameworks/runtime-src/proj.android'
E:/android-ndk-r14b-windows-x86_64/android-ndk-r14b/build//../build/core/build-binary.mk:687: Android NDK: Module cocos2djs_shared depends on undefined modules: cocos2d_js_android_static log
make: Leaving directory `E:/HengShui2client/build/jsb-binary/frameworks/runtime-src/proj.android'
E:/android-ndk-r14b-windows-x86_64/android-ndk-r14b/build//../build/core/build-binary.mk:700: *** Android NDK: Aborting (set APP_ALLOW_MISSING_DEPS=true to allow missing dependencies) . Stop.
执行命令出错,返回值:2。
搜了一下,网上说要换ndk,换成了r10e,OK了
注意:换了ndk之后,记得重新构建一次,再点编译
不知道为什么,我构建了好几次,才编译成功
如果还是失败,看看自己的签名文件对应的别名和密钥对不对