I just freshly installed phonegap and having this problem when I try to build the project with the following command ; \"phonegap build android\"
Well it is so annoying.
In my app folder I did issue the following commands.
set ANT_HOME=C:\apache-ant-1.9.4\
set PATH=%PATH%;%ANT_HOME%\bin
And then the phonegap command works as well. Simply ANT is not resolved unless I issue the aforementioned commands. It took hours to try ANT command work but no light at all. It is simply not working even though it is defined as env variable.
Edit : If you also end up with the minSDK error each time you issue the phonegap build command ( which keeps happening for me right after I upgraded phonegap version to 5.0.0) , please keep in mind that editing manifest.xml wont make a difference because of the reason that it is edited back to its original form by the build command. What you need to do is to change the minSDK version in the www/config.xml file.