gpt4 book ai didi

android - 在 Windows 8 上的 cocos 2dx 游戏开发环境设置中出现错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 07:54:56 24 4
gpt4 key购买 nike

您好,我是 cocos 2d-x 的新手程序员。我以前用c/c++做过编程。我面临的问题是我根据文档设置环境但是当我在项目中导入 proj.android 文件夹时出现错误,指出: * Android NDK:正在中止。 .停止。

请帮忙解决这个问题。控制台中显示的错误是:

        09:48:41 **** Incremental Build of configuration Default for project HelloCpp ****
bash C:/Users/Lapi-1/workspace/HelloCpp/build_native.sh
NDK_ROOT = C:\Users\Lapi-1\Desktop\WORKANDDEVELOPMENT\android-ndk-r8e
COCOS2DX_ROOT = /c/Users/Lapi-1/workspace/HelloCpp/../../..
APP_ROOT = /c/Users/Lapi-1/workspace/HelloCpp/..
APP_ANDROID_ROOT = /c/Users/Lapi-1/workspace/HelloCpp
Using prebuilt externals
Android NDK: WARNING: Ignoring unknown import directory: /c/Users/Lapi- 1/workspace/HelloCpp/../../../cocos2dx/platform/third_party/android/prebuilt
jni/Android.mk:23: *** Android NDK: Aborting. . Stop.
Android NDK: jni/Android.mk: Cannot find module with tag 'cocos2dx' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
make.exe: Entering directory `/c/Users/Lapi-1/workspace/HelloCpp'
make.exe: Leaving directory `/c/Users/Lapi-1/workspace/HelloCpp'

09:48:47 Build Finished (took 5s.798ms)

最佳答案

这只是以类似的形式发生在我身上,当构建 cpp-tests 作为入门教程的一部分时。 (http://www.cocos2d-x.org/wiki/How_to_run_cpp-tests_on_Android 供引用)。我也有 Windows 8。

就我而言,我通过 GitHub checkout 的 cocos2d-x 显然不完整并且缺少一些文件(例如,我的 freetype2 目录)。我从网站上下载了打包的 zip,问题就解决了。也许您的问题源于安装过程中缺少文件。

来自命令提示符的错误日志:

Android NDK: C:\Users\username\Documents\GitHub\cocos2d-x\build\../cocos/./Android.mk: Cannot find module with tag 'freetype2/prebuilt/android' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
make.exe: Entering directory `C:/Users/username/Documents/GitHub/cocos2d-x/tests/cpp-tests/proj.android'
C:\Users\username\Documents\GitHub\cocos2d-x\build\../cocos/./Android.mk:218: *** Android NDK: Aborting. . Stop.
make.exe: Leaving directory `C:/Users/username/Documents/GitHub/cocos2d-x/tests/cpp-tests/proj.android'
Build dynamic library for project [ C:\Users\username\Documents\GitHub\cocos2d-x\build\..\tests/cpp-tests/proj.android ] fails!

下载页面的链接:http://www.cocos2d-x.org/download

希望对您有所帮助!

干杯,

布拉德

关于android - 在 Windows 8 上的 cocos 2dx 游戏开发环境设置中出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21215779/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com