[CC2.3.3][Android] Execution failed for task :game:external NativeBuild ReleaseFeature

Hi! I’m having problem during apk compile on CC 2.3.3 error log says: Execution failed for task

* What went wrong:
Execution failed for task ':game:externalNativeBuildReleaseFeature'.
> Build command failed.
  Error while executing process C:\Android\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Cocos_Projects\GDG_Cocos_Creator_Tutorials\build\jsb-link\frameworks\runtime-src\proj.android-studio\game\jni\Android.mk NDK_APPLICATION_MK=C:\Cocos_Projects\GDG_Cocos_Creator_Tutorials\build\jsb-link\frameworks\runtime-src\proj.android-studio\game\jni\Application.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=C:/Cocos_Projects/GDG_Cocos_Creator_Tutorials/build/jsb-link/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/feature/release/obj NDK_LIBS_OUT=C:\Cocos_Projects\GDG_Cocos_Creator_Tutorials\build\jsb-link\frameworks\runtime-src\proj.android-studio\game\build\intermediates\ndkBuild\feature\release\lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=C:\CocosDashboard\resources\.editors\Creator\2.3.3\resources\cocos2d-x;C:\CocosDashboard\resources\.editors\Creator\2.3.3\resources\cocos2d-x\cocos;C:\CocosDashboard\resources\.editors\Creator\2.3.3\resources\cocos2d-x\external -j4 NDK_DEBUG=0 C:/Cocos_Projects/GDG_Cocos_Creator_Tutorials/build/jsb-link/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/feature/release/obj/local/arm64-v8a/libcocos2djs.so}
  Android NDK: WARNING: Unsupported source file extensions in C:\CocosDashboard\resources\.editors\Creator\2.3.3\resources\cocos2d-x/cocos/Android.mk for module cocos2dx_static    
  Android NDK:   renderer/memop/RecyclePool.hpp    
  [arm64-v8a] Compile++      : cocos2dx_static <= inspector_socket_server.cc
  [arm64-v8a] Compile++      : editor_support_static <= jsb_cocos2dx_editor_support_auto.cpp
  [arm64-v8a] Compile++      : editor_support_static <= jsb_cocos2dx_dragonbones_auto.cpp
  [arm64-v8a] StaticLibrary  : libcocos2d.a
  C:/Android/ndk-bundle/build//../toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/bin/aarch64-linux-android-ar: C:/Cocos_Projects/GDG_Cocos_Creator_Tutorials/build/jsb-link/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/feature/release/obj/local/arm64-v8a/objs/cocos2dx_static/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.o: No such file or directory
  make: *** [C:/Cocos_Projects/GDG_Cocos_Creator_Tutorials/build/jsb-link/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/feature/release/obj/local/arm64-v8a/libcocos2d.a] Error 1
  make: *** Waiting for unfinished jobs....

I could solve it by updating first line in settings.gradle like that:

from:
include ':libcocos2dx',':game', ':instantapp' 
to:
include ':libcocos2dx'

Same problem happened when I was trying to use SDKBox on another project before. Why it happens can anybody enlighten me please?

I’m using these settings:

PROP_COMPILE_SDK_VERSION=29
PROP_MIN_SDK_VERSION=16
PROP_TARGET_SDK_VERSION=29
PROP_BUILD_TOOLS_VERSION=28.0.3
NDK=17.2.4988734

I facing the same problem a few days ago and I already solve it.
This problem happens because the path of your game project is too long.
Please try to move and rename it from:
C:/Cocos_Projects/GDG_Cocos_Creator_Tutorials
To:
C:/CC/GDG_CC_Tut
And then try to build & compile it.

2 Likes

Thanks @aesuhaendi it worked well, thanks!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.