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.
I solved this same problem installing ant with a Windows installer contribution
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.