cocos creator打包android时NDK报错

cocos creator 2.1.1

ndk 17-19均没用

Starting process ‘command ‘E:\Program Files\androidSDK\ndk\17.2.4988734\ndk-build.cmd’’. Working directory: F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\runtime-src\proj.android-studio\app Command: E:\Program Files\androidSDK\ndk\17.2.4988734\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=F:/Work/2020test/idiomGame-2010/idiomGameTest/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\cocos2d-x;F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\cocos2d-x\cocos;F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\cocos2d-x\external -j12 NDK_DEBUG=0 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n
Successfully started process ‘command ‘E:\Program Files\androidSDK\ndk\17.2.4988734\ndk-build.cmd’’
‘E:\Program’ ???е???
???
External native JSON generation. Variant=releaseABI=armeabi-v7a : JSON generation for ABI: %s completed with problem. Exception: Build command failed.
Error while executing process E:\Program Files\androidSDK\ndk\17.2.4988734\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=F:/Work/2020test/idiomGame-2010/idiomGameTest/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\cocos2d-x;F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\cocos2d-x\cocos;F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\cocos2d-x\external -j12 NDK_DEBUG=0 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
‘E:\Program’ ???е???
???

:idiomGameTest:generateJsonModelRelease (Thread[Task worker for ‘:’,5,main]) completed. Took 0.082 secs.

Task :libcocos2dx:transformNativeLibsWithStripDebugSymbolForRelease
Task ‘:libcocos2dx:transformNativeLibsWithStripDebugSymbolForRelease’ is not up-to-date because:
Input property ‘secondaryFileInputs’ file E:\Program Files\androidSDK\ndk\android-ndk-r13b\toolchains\mips64el-linux-android-4.9\prebuilt\windows-x86_64\bin\mips64el-linux-android-strip has been removed.
Input property ‘secondaryFileInputs’ file E:\Program Files\androidSDK\ndk\android-ndk-r13b\toolchains\mipsel-linux-android-4.9\prebuilt\windows-x86_64\bin\mipsel-linux-android-strip has been removed.
Transform inputs calculations based on following changes
E:\Program Files\androidSDK\ndk\android-ndk-r13b\toolchains\mips64el-linux-android-4.9\prebuilt\windows-x86_64\bin\mips64el-linux-android-strip:REMOVED
E:\Program Files\androidSDK\ndk\android-ndk-r13b\toolchains\mipsel-linux-android-4.9\prebuilt\windows-x86_64\bin\mipsel-linux-android-strip:REMOVED
:libcocos2dx:transformNativeLibsWithStripDebugSymbolForRelease (Thread[Task worker for ‘:’ Thread 11,5,main]) completed. Took 0.034 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:idiomGameTest:generateJsonModelRelease’.

Build command failed.
Error while executing process E:\Program Files\androidSDK\ndk\17.2.4988734\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=F:/Work/2020test/idiomGame-2010/idiomGameTest/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\cocos2d-x;F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\cocos2d-x\cocos;F:\Work\2020test\idiomGame-2010\idiomGameTest\build\jsb-default\frameworks\cocos2d-x\external -j12 NDK_DEBUG=0 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
‘E:\Program’ ???е???
???

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with 29 actionable tasks: 2 executed, 27 up-to-date
    –scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s
执行命令出错,返回值:1。

有没有人也碰到解决过的

确认你的工程内和ndk是否包含空格,包含去掉空格符重新编译

解决了,ndk存放路径太长导致的

是不是项目路径太长了

该主题在最后一个回复创建后14天后自动关闭。不再允许新的回复。