Reputation: 1434
When I am trying to add the android platform to a new phonegap project(3.1.0) I get the following error:
Checking Android requirements...
Creating android project...
[Error: An error occured during creation of android sub-project. Creating Cordova project for the Android platform:
Command failed to execute : ant jar
I did a lot of research and tried a lot of potential solutions that did not work. So my last hope is Stackoverflow.
I am using ant 1.9.2 where I'm perfectly able to check the version of ant in the command line. The only problem here is that ant jar
gives me a build.xml error. I think this is the main cause why I get the Command failed to execute : ant jar
error.
I installed phonegap and cordova throughout node and those work perfectly as well.
I dont know what to do, I need to know a way to get a proper build.xml. I hope someone can help me out!
Upvotes: 1
Views: 7895
Reputation: 94
ANT tools could not find tools.jar in JRE lib directory.
In order to solve your issue just :
Copy tools.jar from Java/JDK1.7.0_45/lib directory to Java/JRE7/lib directory and
Run the command cordova platform add android
again.
Hope this helps you.
Upvotes: 8