I am using Cordova-3.3.0, and when trying to create a project for Android I am getting this following error -
Error: Please install Android target 19
If you are using Windows, just go to the environment variables in system and look the System's variable and add both:
C:\proyectos\adt-bundle-windows-x86_64-20131030\sdk\tools\;
C:\proyectos\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\
¡live long and prosper!
Have you correctly set android SDK tools in your Path ?
For Cordova command-line tools to work, you need to include the SDK's tools and platform-tools directories in your PATH environment. On Mac, you can use a text editor to create or modify the ~/.bash_profile file, adding a line such as the following, depending on where the SDK installs:
You have to install the SDK and include tools and platform-tools directories to your path, after you need to install correct versions of Android (19 in your case).
I faced the same problem and the way I solved it is by lunching SDK Manager through the command prompt
The error looked like:
Error: Please install Android target "android-19".
Hunt: Run "android" from your command-line to open the SDK manager.
I simply opened the SDK manager, scrolled down, and downloaded the "Android 4.4.2 (API 19)" as a package and the problem was solved.
I had the same problem, and in my case I was setting the
sdk.dir
property to an invalid location.
Search that property in the whole project and check its value. In my case it was in local.properties, but take a look to project.properties, and ant.properties because they all are loaded in Android's build.xml file.
Hope it helps!
I've just had the same issue, even though I had set the path environment variable for the OS. It turned out to be because I was using Powershell. It worked after I added the following to my profile.ps1:
$env:Path += ";C:\Users\Dan\AppData\Local\Android\sdk\android-sdk\tools"
$env:Path += ";C:\Users\Dan\AppData\Local\Android\sdk\android-sdk\platform-tools"
Typically, the profile.ps1 path will be here:
C:\Users\<username>\Documents\WindowsPowerShell\profile.ps1
To be honest, I'm not quite sure why it didn't work when I added them via the Windows GUI (ie. Advanced System Settings -> Environment variables). So perhaps it's a configuration issue on my part - eitherway, adding it to my profile.ps1 fixed it - so I thought I'd add it hear incase it helps anyone else.