Windows编译LOCAL_SRC_FILES时Cocos2d-x错误指向丢失的文件(和文件夹)Windows [英] Cocos2d-x error while compiling LOCAL_SRC_FILES points to a missing file (and folder) Windows

查看:183
本文介绍了Windows编译LOCAL_SRC_FILES时Cocos2d-x错误指向丢失的文件(和文件夹)Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

晚上好.

我一直在尝试使用cocos2d-x编译HelloWorld. 我使用了以下命令:

I'm stuck trying to compile a HelloWorld using the cocos2d-x. I used the following commands:

  • cocos compile -p android --android-studio
  • cocos compile -p android --android-studio
  • cocos compile -p android
  • cocos compile -p android --android-studio
  • cocos compile -p android --android-studio
  • cocos compile -p android

我总是有相同的答案

Android NDK: ERROR:C:\Users\santi_000\Desktop\Android\cocos2d\HelloWorld\proj.android\../cocos2d/external/freetype2/prebuilt/android/Android.mk:cocos_freetype2_static: LOCAL_SRC_FILES points to the missing file
Android NDK: Check que C:/Users/santi_000/Desktop/Android/cocos2d/HelloWorld/proj.android/../cocos2d/external/freetype2/prebuilt/android/arm64-v8a/libfreetype.a exists or que its path is correct
make: Entering directory `C: /Users/santi_000/Desktop/Android/cocos2d/HelloWorld/proj.android '
C: / Users / santi_000 / AppData / Local / Android / sdk / ndk-bundle / build //../ build / core / prebuilt-library.mk: 45: *** Android NDK: Aborting. Stop.
make: Leaving directory `C: /Users/santi_000/Desktop/Android/cocos2d/HelloWorld/proj.android '
Error running command, return code: 2.

我在StackOverFlow中找到了一些页面,但是没有一个对我有帮助.我正在使用Windows.我意识到我什至没有arm64-V8A文件夹,该怎么办?我可以在哪里复制它,或者如何生成它?

I found some pages here in StackOverFlow however none of them helped me. I'm using Windows. I realized I do not even have the arm64-V8A folder, what do I do? Where I can copy it, or how can I generate it?

谢谢.

推荐答案

以下内容对我有用

cocos compile --android-studio --target android-22 
    --ap android-22 --ndk-mode debug --ndk-toolchain arm-linux-androideabi-4.9 
    --platform android --app-abi armeabi --src C:\cocos2d-x\tests\cpp-tests

您将需要将--ndk-toolchain替换为NDK安装随附的正确版本.检入NDK_ROOT内的toolchains文件夹.

You will need to replace the --ndk-toolchain to the proper one that comes with your NDK installation. Check in the toolchains folder inside NDK_ROOT.

真正起作用的最重要的工具是--app-abi armeabi,因为这就是所使用的工具链.

The most important one that actually got it working was --app-abi armeabi as that is what was the toolchain used.

如果您实际检查cocos compile -h,您会看到--app-abi提到armeabi作为默认值.但事实并非如此.它选择arm64作为默认值.

If you actually check cocos compile -h you will see that --app-abi mentions armeabi as the default. But that is not the case. It is picking up arm64 as the default.

这篇关于Windows编译LOCAL_SRC_FILES时Cocos2d-x错误指向丢失的文件(和文件夹)Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆