一、下载Ant http://ant.apache.org/bindownload.cgi
二、解压到指定目录下,设置环境变量,例如目录在D盘下
ANT_HOME=d:/ant
path=d:/ant/bin
三、错误信息解决方法
1.The processing instruction must begin with the name of the target.
解决方法:build.xml文件声明<?xml......>在?和xml中间多了个空格,去掉即可。