sh: cocos: command not found

前端之家收集整理的这篇文章主要介绍了sh: cocos: command not found前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

sh: cocos: command not found

解决

执行cocos2dx安装脚本『跟目录的setup.py』
根据提示进行配置。

安装完成后用户环境变量内会添加如下配置

# Add environment variable COCOS_CONSOLE_ROOT for cocos2d-x
export COCOS_CONSOLE_ROOT=/Users/baodong/cocos/cocos2d-x-3.7.1/tools/cocos2d-console/bin
export PATH=$COCOS_CONSOLE_ROOT:$PATH

# Add environment variable COCOS_TEMPLATES_ROOT for cocos2d-x
export COCOS_TEMPLATES_ROOT=/Users/baodong/cocos/cocos2d-x-3.7.1/templates
export PATH=$COCOS_TEMPLATES_ROOT:$PATH

# Add environment variable ANDROID_SDK_ROOT for cocos2d-x
export ANDROID_SDK_ROOT=/Users/baodong/Library/Android/sdk
export PATH=$ANDROID_SDK_ROOT:$PATH
export PATH=$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$PATH

# Add environment variable ANT_ROOT for cocos2d-x
export ANT_ROOT=/Users/baodong/__DEV__/apache-ant-1.9.5/bin
export PATH=$ANT_ROOT:$PATH

# Add environment variable NDK_ROOT for cocos2d-x
export NDK_ROOT=/Users/baodong/__DEV__/android-ndk-r10e
export PATH=$NDK_ROOT:$PATH
原文链接:https://www.f2er.com/cocos2dx/341755.html

猜你在找的Cocos2d-x相关文章