0
我正在使用PhoneGap,它安裝了大量的東西,它往往需要。目前,在命令行中運行,得出:PhoneGap:'ANT_HOME設置不正確或找不到螞蟻。請設置ANT_HOME。'
$ ant -version
Apache Ant(TM) version 1.8.4 compiled on May 22 2012
$ phonegap -v
3.5.0-0.20.10
$ cordova -v
3.5.0-0.2.7
$ npm -v
1.4.21
但隨着PhoneGap的或科爾多瓦編譯產生:
$ phonegap local build android
[phonegap] compiling Android...
cp: no such file or directory: E:\Projects\Tets\icon.png
cp: no such file or directory: E:\Projects\Tets\res\icon\ios\icon-72.png
ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
檢查的路徑:
ANT_HOME=/cygdrive/c/Users/HP/AppData/Roaming/npm/node_modules/ant/ant
PATH=/usr/local/bin:<standard path data...>:/cygdrive/c/Users/HP/AppData/Roaming/npm/node_modules/ant/ant/bin:/cygdrive/c/Users/HP/AppData/Roaming/npm
安裝時可見npm install ant
,我遇見與此警告:
npm WARN engine [email protected]: wanted: {"node":"~0.8.0"} (current: {"node":"0.10.30","npm":"1.4.21"})
它似乎安裝很好,我只需手動添加路徑。
任何幫助將不勝感激。
Follow link http://stackoverflow.com/questions/5607664/error-installing-ant-ant-home-is-set-incorrectly/32183652#32183652 – 2015-08-24 13:55:58