721
社区成员
发帖
与我相关
我的任务
分享
错误提示信息是这样的
> Build command failed.
Error while executing process /Users/mymac/Library/Android/sdk/ndk/21.4.7075529/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/mymac/MyCode/other/ThaiGame/newCliet/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/jni/Android.mk NDK_APPLICATION_MK=/Users/mymac/MyCode/other/ThaiGame/newCliet/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-24 NDK_OUT=/Users/mymac/MyCode/other/ThaiGame/newCliet/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/Users/mymac/MyCode/other/ThaiGame/newCliet/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=/Users/mymac/MyCode/other/ThaiGame/newCliet/build/jsb-default/frameworks/cocos2d-x:/Users/mymac/MyCode/other/ThaiGame/newCliet/build/jsb-default/frameworks/cocos2d-x/cocos:/Users/mymac/MyCode/other/ThaiGame/newCliet/build/jsb-default/frameworks/cocos2d-x/external -j12 NDK_DEBUG=1 cocos2djs}
Android NDK: WARNING: Unsupported source file extensions in /Users/mymac/MyCode/other/ThaiGame/newCliet/build/jsb-default/frameworks/cocos2d-x/cocos/Android.mk for module cocos2dx_static
Android NDK: ../external/sources/edtaa3func/edtaa3func.h renderer/memop/RecyclePool.hpp
有没有大佬知道这个是什么问题,怎么解决呀,ndk是确保没有问题的
你的错误提示中,Android NDK在构建cocos2dx_static模块时,遇到了不支持的源文件扩展名。具体提示的是edtaa3func.h和RecyclePool.hpp这两个文件。
一般来说,Android NDK 支持的源文件扩展名包括 .c, .cpp, .cxx 等。对于头文件 (.h, .hpp),在编译中一般是被包含在源文件中的,而不是直接参与编译。
在你的Android.mk文件中,可能错误地把这些头文件包含在了需要编译的源文件列表中,你需要把这两个文件从源文件列表中移除。Android.mk中的LOCAL_SRC_FILES变量定义了需要编译的源文件列表,你需要查看是否有头文件被错误地包含在了这个列表中。
如果这两个文件是在其他.cpp或.c文件中被包含的,那就不需要加入到源文件列表中。你需要正确地将头文件与源文件分别处理。
以上是一个可能的答案,但是问题的具体答案可能还需要你根据你的具体代码情况来确定。如果问题依然存在,你可能需要提供更详细的信息。