creator2.3.0新建项目编译android报错

FAILURE: Build failed with an exception.

  • What went wrong:

Task :game:externalNativeBuildReleaseFeature FAILED
:game:externalNativeBuildReleaseFeature (Thread[Daemon worker Thread 6,5,main]) completed. Took 18.311 secs.
Execution failed for task ‘:game:externalNativeBuildReleaseFeature’.
Build command failed.
Error while executing process E:\work\android-ndk-r20b\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=E:\work\code\fengshen\creator-client\build\jsb-default\frameworks\runtime-src\proj.android-studio\game\jni\Android.mk NDK_APPLICATION_MK=E:\work\code\fengshen\creator-client\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:/work/code/fengshen/creator-client/build/jsb-default/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/feature/release/obj NDK_LIBS_OUT=E:\work\code\fengshen\creator-client\build\jsb-default\frameworks\runtime-src\proj.android-studio\game\build\intermediates\ndkBuild\feature\release\lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=E:\work\code\fengshen\creator-client\build\jsb-default\frameworks\cocos2d-x;E:\work\code\fengshen\creator-client\build\jsb-default\frameworks\cocos2d-x\cocos;E:\work\code\fengshen\creator-client\build\jsb-default\frameworks\cocos2d-x\external -j4 NDK_DEBUG=0 E:/work/code/fengshen/creator-client/build/jsb-default/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/feature/release/obj/local/armeabi-v7a/libcocos2djs.so}
Android NDK: WARNING: Unsupported source file extensions in E:\work\code\fengshen\creator-client\build\jsb-default\frameworks\cocos2d-x/cocos/Android.mk for module cocos2dx_static
Android NDK: renderer/memop/RecyclePool.hpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= AppDelegate.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= inspector_socket_server.cc
make: *** [E:/work/code/fengshen/creator-client/build/jsb-default/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/feature/release/obj/local/armeabi-v7a/objs/cocos2dx_static/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.o] Error 3
make: *** Waiting for unfinished jobs…

  • 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.

  • Get more help at https://help.gradle.org
    101 actionable tasks: 8 executed, 93 up-to-date

BUILD FAILED in 44s
ִ���������������ֵ��1��

这是啥错呢,是我sdk不对还是ndk不对

windows 系统遇到这个报错,建议你把项目构建目录放到系统盘的根目录,之后删了 build 文件夹中的 jsb-default 文件夹,然后重新构建打包试试。

1赞

按照你的方法试了,但是还是不行。我也遇到了这个问题,这是因为windows10 目录深了出的错吗?