I am trying to get set up on a basic Hello World phonegap android application. I have installed and correctly configured the paths for ant, the java jdk, and the android sdk. However, when I attempt to run
create C:\Users\Shoes\Documents\Dev\Test com.codebundle.test Test
and cordova gave me the following error
Missing one of the following:
JDK: http://java.oracle.com
Android SDK: http://developer.android.com
Apache ant: http://ant.apache.org
I have tested that all the paths are setup correctly by trying
ant
adb
java
All worked fine, Please help
To add the paths to the PATH variable isn't enough. You need to add JAVA_HOME explicit with the path to the bin folder of the JDK, for example:
JAVA_HOME -> C:\Program Files\Java\bin
Phonegap/Cordova is looking for the JAVA_HOME variable in your settings.
If you type "android" what happens? You need to make sure that the $ANDROID_HOME/tools and $ANDROID_HOME/platform-tools are both in your $PATH.
http://docs.phonegap.com/en/2.2.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android
Worked with a friend last night and his problem was the JRE was in his path and not the JDK. So when he typed javac it could not be found. If you have the same issue you'll need to update your PATH to point to the location of the JDK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With