I\'m trying to do phonegap build android
and I have this message :
[phonegap] detecting Android SDK environment...
[phonegap] using the local en
It was a problem with my proxy. Cordova create a .cordova
directory and try to download something on the internet. The download did not work. Next time, it check if there is a .cordova
directory. It don't try to redownload something because the directory exist and it show the error.
I removed the .cordova
directory and I solved my problems with proxy. Now, everythings works.
In Windows machine you have to delete .cordova directory under C:\Users\user_name\
Did you set your PATH variable? Sometimes this error occurs in Windows when the PATH variable is not set correctly to access "java" and "ant" exes. If you want to test if they are correctly set, you can simply execute both (from any folder in your command line):
> java
or
> ant
and both programs should be found.
I had the exact same problem for a different reason. I had an old version of ant (1.7.1). At least version 1.8.2 is needed for the build to work.
This is because you haven't installed ANT! download it from here and install it step by step https://ant.apache.org/manual/install.html
Then running the last command it will install the dependencies needed.
its either due to improper installation or no installation of ANT or JAVA. But moreover we need to add Android SDk and prepare Android Targets via SDK manager before going through this.