I have installed the latest cordova. The version is 4.3.0. I created an empty Cordova project:
cordova create test com.test Test
I then add the platform:
cordova platform add android
I built the project with:
cordova build android
But i always get:
[Error: Please install Android target: "android-21".
Hint: Open the SDK manager by running: C:\Program\ Files\ (x86)\Android\android-studio\sdk\tools\android.BAT
You will require:
1. "SDK Platform" for android-21
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)]
So i ran "android" to confirm I have latest SDK installed:
I then tried changing the target android sdk to be 19 so in AndroidManifest.xml I changed:
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="21" />
to:
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
I ran the build command again, and I still get the exact same error. This is driving me nuts. Anyone have any ideas? I've built many many cordova projects on this same PC and have never seen this problem before.