3

您好,我是 cocos2dx 的新手。我在 Windows 7 / Eclipse 中配置 cocos2dx。我创建了一个正在运行的名为 helloworld 的项目,但是当我运行示例项目(helloCpp,testCpp)时出现错误:

bash /build_native.sh 
Cannot run program "bash": Launching failed
Error: Program "bash" not found in PATH

我已经尝试过Cocos2d-x android can't resolve coscos2dx library

4

4 回答 4

1

相信我,我已经尝试在 Windows 机器上设置 cocos2dx 大约 2 周了,但我根本没有成功。我遇到了很多问题,还有编译 CPP 代码和构建路径问题的问题。切换到 MAC 更容易,最重要的是,使跨平台应用程序窗口没有任何意义,因为您无法在 Windows 机器上运行 iOS 模拟器

于 2013-04-07T17:23:18.910 回答
0

设置环境变量(c:/cygwin/bin),问题就解决了

于 2013-07-16T08:13:30.310 回答
0

所有环境变量设置正确。环境变量列表为:Android SDK 路径、Python 和 Apache Ant。然后尝试在命令提示符上运行 ./build_native.sh。参考链接:这里

于 2016-05-12T05:21:26.757 回答
0

你需要一个正确的所有版本

Cocos2d-x 3.6 Apache ant python 2.7 Eclipse Java

1.Set Java and Apache Path in Global Environment 
2.Extract cocos2d-x 3.6 Download Version
3.Open the setup.py file
4. add this all in Environment File 

COCOS_CONSOLE_ROOT = 'COCOS_CONSOLE_ROOT' => Here is your File where you are add
COCOS_X_ROOT = 'COCOS_X_ROOT' => you get this in Cocos2dx Folder
COCOS_TEMPLATES_ROOT = 'COCOS_TEMPLATES_ROOT'=> you get this in cocos2dx Folder
NDK_ROOT = 'NDK_ROOT' => Download NDK 9.2
ANDROID_SDK_ROOT = 'ANDROID_SDK_ROOT'=> your Eclipse root
ANT_ROOT = 'ANT_ROOT' => apache ant root`enter code here`

首先在环境中添加正确然后运行CMD,干杯:)!

于 2019-01-22T15:04:28.513 回答