cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.02k stars 7.05k forks source link

An error when Build apk at Apple Silicon #20790

Closed hahazoe closed 4 months ago

hahazoe commented 4 months ago

I build apk using androidstudio and when it runs task "externalNativeBuildDebug" it gives an error:

_Execution failed for task ':Cocos2dxTools:externalNativeBuildDebug'. Build command failed. Error while executing process /Users/xuhao/Library/Android/sdk/ndk/16.1.4479499/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Volumes/otherdisk/MyTest/Cocos2dxTools/frameworks/runtime-src/proj.android/app/jni/Android.mk NDK_APPLICATION_MK=/Volumes/otherdisk/MyTest/Cocos2dxTools/frameworks/runtime-src/proj.android/app/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/Volumes/otherdisk/MyTest/Cocos2dxTools/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/Volumes/otherdisk/MyTest/Cocos2dxTools/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/lib NDK_TOOLCHAIN_VERSION=clang -j11 NDK_MODULE_PATH=/Volumes/otherdisk/MyTest/Cocos2dxTools/frameworks/cocos2d-x:/Volumes/otherdisk/MyTest/Cocos2dxTools/frameworks/cocos2d-x/cocos:/Volumes/otherdisk/MyTest/Cocos2dxTools/frameworks/cocos2d-x/external NDK_DEBUG=1 cocos2dlua}_