标签:
终端下输入:vi .bash_profile 编辑环境变量:
export COCOS_CONSOLE_ROOT=/Users/jiazedong/Cocos2d-x/cocos2d-x-3.2/cocos2d-x-3.2/tools/cocos2d-console/bin export PATH=$COCOS_CONSOLE_ROOT:$PATH export NDK_ROOT=/Users/jiazedong/Cocos2d-x/PackageAndroid/ndk export PATH=$NDK_ROOT:$PATH export ANDROID_SDK_ROOT=/Users/jiazedong/Cocos2d-x/PackageAndroid/sdk export PATH=$ANDROID_SDK_ROOT:$PATH export ANT_ROOT=/Users/jiazedong/Cocos2d-x/PackageAndroid/ant/bin export PATH=$ANT_ROOT:$PATH
输入:source .bash_profile 使刚才输入的环境变量生效!
查看ant 是否安装:ant -version
若成功,则会显示版本:
Apache Ant(TM) version 1.9.4 compiled on April 29 2014
查看java是否安装: java -version
若成功,则会显示版本:
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
标签:
原文地址:http://my.oschina.net/Jacedy/blog/363508