Sjaak Rusma
Sjaak Rusma

Reputation: 1434

phonegap run android: command failed to execute: ant jar - on Windows

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 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

Answers (1)

Antonio dS
Antonio dS

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

Related Questions