One, download ant
Download Address: http://ant.apache.org/bindownload.cgi
Download older versions of the old Ant releases found here
The address is as follows: old version download address
1.8.2 version csdn resource download: 1.8.2 version Download address
Copy the download file to the main file and extract it to the current folder
For example:/home/pateo/apache-ant-1.8.2
Second, configure environment variables
Open Terminal: pateo@pateo-optiplex-3020:~$ gedit. BASHRC #用gedit Open environment variable configuration file
Add the environment path to the file and modify it as follows:
Export ant_home=/home/pateo/apache-ant-1.8.2
#export/usr/local/jdk1.6.0_45= "/usr/lib/jvm/jdk1.6.0_45/"
Export Path=/usr/local/jdk1.6.0_45/bin: $ANT _home/bin: $PATH
Export android_java_home=$/usr/local/jdk1.6.0_45
Export android_java_toolchain=$/usr/local/jdk1.6.0_45/bin/
export java_home=/usr/local/jdk1.6.0_45
Export PATH
unset USERNAME
which has increased
Export ant_home=/home/pateo/apache-ant-1.8.2
Modify
Export Path=/usr/local/jdk1.6.0_45/bin: $ANT _home/bin: $PATH
And then close the file
Enter pateo@pateo-optiplex-3020:~$ source in the terminal BASHRC #source.
Third, verify the ant configuration
Enter ant-version view version in terminal
pateo@pateo-optiplex-3020:~$ ant-version
Apache Ant (TM) version 1.8.2 compiled on December 20 2010