2

I am receiving this error message while trying to run "cordova platform add android":

"Error: Please install Android target 19 (the Android newest SDK). Make sure you have the latest Android tools installed as well. Run "android" from your comm and-line to install/update any missing SDKs or tools."

However, I have the SDK installed (SDK Tools 23.0.2, SDK Platform-tools 20, SDK Build-tools 19.1). I have my ANDROID_HOME set to "C:\Program Files\Android\android-sdk". This is the tail of the environment variable PATH on my computer:

"...;C:\Program Files\Java\jdk1.7.0_67\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;%USERPROFILE%\AppData\Roaming\npm;C:\Program Files\Android\android-sdk\tools;C:\Program Files\Android\android-sdk\platform-tools;C:\Program Files\Android\android-sdk\build-tools;%USERPROFILE%\AppData\Roaming\npm;C:\Program Files\WinAnt\bin"

Can anyone clarify if I am doing something wrong here? How to make it work?

NurShomik
  • 237
  • 5
  • 14

1 Answers1

5

What I found out eventually is when Cordova asks for Android target 19, it does not mean Android SDK Revision 19. Rather it refers to the Android 4.4.2 which has an API level 19.

So installing the Android 4.4.2 from SDK manager was the solution.

NurShomik
  • 237
  • 5
  • 14
  • Do you think that there is a way that the error message ("Please install Android target 19 (the Android newest SDK).") could be improved? – Ian Clelland Sep 14 '14 at 02:44
  • @IanClelland, I think if the word 'API' could be added next to '19', it would be more obvious to Android noobs like me. – NurShomik Sep 14 '14 at 02:56
  • 1
    Check out [the JIRA issue](https://issues.apache.org/jira/browse/CB-7536) if you want to make any other suggestions directly to the Cordova devs; I've already linked this question to the issue. – Ian Clelland Sep 15 '14 at 15:27