------------------------------------------------------------------------------------
安裝Apache Ant
$ant -v
下載Apache Ant
http://ant.apache.org/bindownload.cgi
$ tar vxf apache-ant-1.9.4-bin.tar.gz
$ ln -s apache-ant-1.9.4/ apache-ant (建立捷徑)
------------------------------------------------------------------------------------$ tar vxf apache-ant-1.9.4-bin.tar.gz
$ ln -s apache-ant-1.9.4/ apache-ant (建立捷徑)
顯示隱藏檔
defaults write com.apple.finder AppleShowAllFiles TRUE;\killall Finder
不顯示隱藏檔
defaults write com.apple.finder AppleShowAllFiles FALSE;\killall Finder
------------------------------------------------------------------------------------
開啟Finderv --> 名字的目錄 --> .bash_profile檔
加入相關Lib路徑:
## For Java
export JAVA_HOME=/Library/Java/Home
## For Android
export ANDROID_HOME=/develope/Lib/android-sdk
export PATH=$PATH:/develope/Lib/android-sdk/tools/
export PATH=$PATH:/develope/Lib/android-sdk/platform-tools/
## For ANT
export ANT_HOME=/develope/Lib/apache-ant
export PATH=$PATH:$JAVA_HOME/bin:$ANDROID_HOME/bin:$ANT_HOME/bin
存檔-->離開
重啟或重新登入失效,則可以執行,即生效:
$source .bash_profile
$touch .bash_profile
echo $JAVA_HOME
echo $ANDROID_HOME
echo $ANT_HOME
echo $PATH
No comments:
Post a Comment