Kelvin Cayman
Kelvin Cayman

Reputation: 187

cordova Install Android Targets: Not installed (Using sdkmanager)

I am on ubuntu 18.04.

I am setting up a cordova project. I dont want to install Android Studio so I downloaded sdk tools package. However when I run cordova requiremets, I keep getting the out put below.

View image here

That means I have not installed the android targets yet.

I have tried to look for proper guides on how to install android target with sdk tools without installing Android Studio without success. Help on this will be highly appreciated.

(I hope my question is clear, English not so good, for clarification ask)

Upvotes: 2

Views: 1852

Answers (2)

Kelvin Cayman
Kelvin Cayman

Reputation: 187

I finally cracked it. What you need to do is:

use sdkmanager commands to install platforms and other modules.

Note: Android command is deprecated.

First list all remotely available tools.

sdkmanager --list

From the list you can, for example, install platforms;android-27

sdkmanager --install "platforms;android-27"

When you run cordova requirements, now you will find that they are android targets are installed and listed.

Upvotes: 2

Delwyn Pinto
Delwyn Pinto

Reputation: 612

That error message tells you what is missing and what you need to do.

You do not have an Android SDK installed on your machine. You either download it with Android Studio or download the SDK separately from here : https://developer.android.com/studio/#downloads

Upvotes: -1

Related Questions