s korhani
s korhani

Reputation: 356

How to install Android target in windows

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

Answers (3)

Ashish Rawat
Ashish Rawat

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

Rahul Tiwari
Rahul Tiwari

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:

  • From the Android Studio File menu: File > Settings > Appearance & Behavior > System Settings > Android SDK.
  • From the Android Studio Tools menu: Tools > Android > SDK Manager.
  • From the SDK Manager icon (enter image description here) in the menu bar.

Upvotes: 2

Vaiden
Vaiden

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:

  1. Install the Android 5.0 package through the SDK Manager that comes with the Android SDK bundle.

  2. 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

Related Questions