安卓打包报错 native-utils.js:1:18812

creator版本: 2.3.3
打原生Android包 , 编译的时候报错如下

Error: Compile failed. The log file path [ C:\Users\admin.CocosCreator\logs\native.log ]
at ChildProcess. (C:\soft\CocosDashboard\resources.editors\Creator\2.3.3\resources\app.asar\editor\core\native-utils.js:1:18812)
at ChildProcess. (C:\soft\CocosDashboard\resources.editors\Creator\2.3.3\resources\app.asar\editor\core\native-utils.js:1:6424)
at ChildProcess.emit (events.js:194:13)
at ChildProcess.EventEmitter.emit (domain.js:469:20)
at maybeClose (internal/child_process.js:998:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)

native.log

  • What went wrong:
    Execution failed for task ‘:game:externalNativeBuildRelease’.

Build command failed.
Error while executing process C:\Users\admin\AppData\Local\Android\Sdk\ndk\21.0.6113669\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=E:\work1\and\build\jsb-default\frameworks\runtime-src\proj.android-studio\game\jni\Android.mk NDK_APPLICATION_MK=E:\work1\and\build\jsb-default\frameworks\runtime-src\proj.android-studio\game\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=E:/work1/and/build/jsb-default/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=E:\work1\and\build\jsb-default\frameworks\runtime-src\proj.android-studio\game\build\intermediates\ndkBuild\release\lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=E:\work1\and\build\jsb-default\frameworks\cocos2d-x;E:\work1\and\build\jsb-default\frameworks\cocos2d-x\cocos;E:\work1\and\build\jsb-default\frameworks\cocos2d-x\external -j6 NDK_DEBUG=0 E:/work1/and/build/jsb-default/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/libcocos2djs.so}
process_begin: CreateProcess(C:\Users\admin\AppData\Local\Android\Sdk\ndk\21.0.6113669\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe, C:/Users/admin/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//…/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -print-resource-dir, …) failed.
make: C:/Users/admin/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//…/build/core/setup-toolchain.mk:113: pipe: No error
Android NDK: WARNING: Unsupported source file extensions in E:\work1\and\build\jsb-default\frameworks\cocos2d-x/cocos/Android.mk for module cocos2dx_static
Android NDK: renderer/memop/RecyclePool.hpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_gfx_auto.cpp
clang++: error: unable to execute command: Couldn’t execute program ‘C:/Users/admin/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//…/toolchains/llvm/prebuilt/windows-x86_64/bin\clang++.exe’: ??? (0x5)
make: *** [C:/Users/admin/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//…/build/core/build-binary.mk:478: E:/work1/and/build/jsb-default/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/cocos2dx_static/scripting/js-bindings/auto/jsb_gfx_auto.o] Error 1
make: *** Waiting for unfinished jobs…
clang++: error: unable to execute command: Couldn’t execute program ‘C:/Users/admin/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//…/toolchains/llvm/prebuilt/windows-x86_64/bin\clang++.exe’: ??? (0x5)
make: *** [C:/Users/admin/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//…/build/core/build-binary.mk:478: E:/work1/and/build/jsb-default/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/cocos2dx_static/scripting/js-bindings/manual/jsb_renderer_manual.o] Error 1
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_renderer_manual.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= EffectVariant.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= EffectBase.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_renderer_auto.cpp

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.