I am using Cordova for mobile application development.
I have installed Cordova using npm command and after the installation, I have created a cordova project. Whenever I try to add a platform (android) to the project it throws following error:
Error : Executing command 'ant', make sure you have ant installed and added to your path
I have already installed ant
on my system and configured path to %ANT_HOME%\bin
and other respective required platforms such as JAVA_HOME
, ANDROID_PLATFORM_TOOLS
and ANDROID_TOOLS
.
Whenever I execute the ant
command in cmd, no error's are thrown. For example, after the execution of ant -version
command in cmd received output is:
Apache Ant(TM) version 1.9.3 compiled on December 23 2013.
I went through many of the questions at Stack Overflow and solved the issue of tools.jar
not being present at JRE's Lib
directory. still the platform add
is not working.
Please do help me out with this. Any help will be appreciated.
You can check whether ANT is successfully installed by running the following command into the command prompt: ant –version - The Official 360logica Blog.
Installing Apache Ant Unzip the zip file to a convenient location c:\folder by using Winzip, winRAR, 7-zip or similar tools. Create a new environment variable called ANT_HOME that points to the Ant installation folder. In this case, it is c:\apache-ant-1.10. 12-bin folder.
I solved this same problem installing ant with a Windows installer contribution
https://code.google.com/p/winant/
At last I was able to figure out the answer of my question.
After a long day, I tried adding IOS platform for same project and I received an error code 'ENOENT' through cordova.
I did some R&D and finally found a solution at -- Phone Gap [error] cmd: Command failed with exit code ENOENT
Again thank you all for your precious time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With