Reputation: 83
Hi all I've been trying for days to get cordova to work. I have installed java jdk, android studio and apache ant. when I go to a cmd prompt and type javac the output indicates it is installed fine, when I type ant -version. that also indicates that it is installed fine.
I have added a variable setting for ANDROID_HOME = C:\Program Files\Android\Android Studio\bin and also added it to path in the system variables. I have also added just the path to to the android studio without the bin dir.
but every time I run the command
cordova platform add android
I keep getting the error Failed to run "android" make sure you have the latest version of android sdk installed.
Can anyone help?
Upvotes: 0
Views: 276
Reputation: 161
You will need to download the android SDK. Once you have this downloaded you will need to add both \android-sdk\tools
and \android-sdk\platform-tools
to your environment variables path.
You do not need to add the android studio to your path.
Also it may help to make note, that the target api for the latest version of cordova is 19, so make sure to install this as well as the latest api to avoid any further errors.
Upvotes: 2