Sunday, June 29, 2014

[Ionic][Resolved][Windows] Error : Failed to run "ant -version", make sure you have ant installed and added to your path

While I follow the getting start tutorial in official site and try running the build the ionic android app command: "ionic build ios". To solve this problem , you need download and install the Apache ANT project and config the related environment values.

Step1)
Download the Apache AND project from this link:
http://ant.apache.org/bindownload.cgi
For me, I download the source from this link:
http://apache.01link.hk//ant/binaries/apache-ant-1.9.4-bin.zip

Step2)
Move the zip-file you downloaded to somewhere which you wanted to be the installation directory.

Step3)
Unzip the files you moved

Step4)
Edit 2 enirnomanet values:
For my case, my ant was unziped to this path, so this is the home of my ant:
C:\wamp\apps\apache-ant-1.9.4

Add a value named "ANT_HOME" in you system valuable.
C:\wamp\apps\apache-ant-1.9.4

And then edit the value named "Path" at your system valuable, Add that at the end of the value existed.
%ANT_HOME%\bin

Step5)
After finish the setting, Save and restart your command prompt

Build the app again:




Related site:
http://ant.apache.org/bindownload.cgi

1 comment :

  1. nice :D but what about linux? i gettin error on my ubuntu

    ReplyDelete