Reputation: 356
I've installed Android SDK directly from Google's developer website, and I've installed All 16 packages which was checked to be installed in Android SDK manager by default.
SDK tools 24.3.4, 23.0.1, 21.0.1, 20, Build tools 23.0.1, SDK platform 23 and some other items. I also have a android-sdk\platform-tools folder sized 9.24 MB.
But still I'm getting this error while running:
cordova build android
the error:
[Error: Please install Android target: "android-21"
...
1. "SDK Platform" for android-21
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)]
What should I install to solve this problem?
Upvotes: 0
Views: 5816
Reputation: 5849
You have already installed enough, Go to build.gradle files, and change the compileSdkVersion to 22, or 23 anything that is already installed.
Upvotes: 1
Reputation: 6978
you will have to use sdk manager to download targets other then bundled by default.
You can launch the SDK Manager in one of the following ways:
Upvotes: 2
Reputation: 16142
android-21 is an indicator for Android API level 21, which means Android 5.0 (Lollipop).
Here is the entire list of API levels.
So you need to either:
Install the Android 5.0 package through the SDK Manager that comes with the Android SDK bundle.
Change the target of your project to one of the SDKs you do have installed, asuuming that there are no API 21 specific code in said project.
Upvotes: 0