I installed the last cordova. Version 4.3.0. I created an empty Cordoba project:
cordova create test com.test Test
Then I add the platform:
cordova platform add android
I built a 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 the “android” to confirm that I have the latest SDK installed:

Then I tried to change the target Android-sdk to 19, so in AndroidManifest.xml I changed:
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="21" />
at
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
I ran the build command again and I still get the same error. It drives me crazy. Does anyone have any ideas? On the same computer, I created many cordova projects and had never seen this problem before.
source
share