n0talentGEEK
n0talentGEEK

Reputation: 163

PhoneGap Getting Started with Android "Missing one of the following"

I am currently following this tutorial about getting started on PhoneGap. I have installed everything and set the path on system variable.

But when I am going to build the project it always give an error of

Missing one of the following: JDK Android SDK Apache ant

I have check with command, java, adb, ant, inside the command prompt. java and adb seems work perfectly, but ant return an error "Build.xml does not exist. build failed".

How can I generate the project file?

Upvotes: 13

Views: 15729

Answers (4)

Emanuel
Emanuel

Reputation: 155

In addition to what has been said, I had two more problems :

1) The spaces in the paths were causing trouble : I replaced the Program Files folder this way :

Program Files = Progra~1

Program Files (x86) = Progra~2

2) cscript.exe was not recognized so I added the System32 folder to the PATH.

Upvotes: 2

Hersker
Hersker

Reputation: 547

For me the problem was the variables for ANT_HOME and JAVA_HOME. I found different descriptions on how they should look (eg. %JAVA_HOME%\bin). It dident work for me check the pics out for how to set the variables correctly. Also put the reference to C:\Java\jdk1.6.0_31\bin and C:\Java\apache-ant-1.8.4\bin on your path variable.

how java home should look like

How ant home should look like

Take note that you may have installed jdk and ant in different directories than i did, but the above is how they should look.

Upvotes: 12

dardawk
dardawk

Reputation: 466

Ensure that you don't use a dash ("-") or a space in the directory that you are creating your project. As well, I would ensure that you have the ANT_HOME variable pointing to the correct directory. Simon's blog points this out, but you can get slightly more info (on this particular thing) from my post here: installing Cordova\PhoneGap .

I use the ant directory found in eclipse\plugins\org.apache.ant... Perhaps your ant directory in the sys variables is to a different ant installation? Not sure if that would be a problem.

Upvotes: 3

Simon MacDonald
Simon MacDonald

Reputation: 23273

You may want to check out my supplemental to the getting started guide:

http://simonmacdonald.blogspot.ca/2012/11/getting-create-command-to-work-on.html

You will need to make sure you can execute javac as well and that your JAVA_HOME is set correctly.

Don't worry about the ant error. As long as it is found from the command line it will work properly when launched from a directory with a build.xml.

Upvotes: 29

Related Questions