Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I update Android SDK in Linux via command line

Tags:

android

Is there a ubuntu commandline command to update my Android API, I need to download android-19

Note: I am using ubuntu commandline only, no GUI.

Thanks,

like image 360
LayoutPH Avatar asked Dec 01 '14 08:12

LayoutPH


People also ask

How do I know if Android SDK is installed on Linux?

if it is the case, select “Configure” > “SDK Manager”: 2. Navigate to “Appearance & Behavior” > “System Settings” > “Android SDK” and now you can see the SDK versions that were installed in the “API Level” and “Name” columns (focus on “API Level”).

How use Sdkmanager command line?

To use the SDK Manager to install a version of the command line tools, follow these steps: Download the latest "command line tools only" package from the Android Studio downloads page and unzip the package. Move the unzipped cmdline-tools directory into a new directory of your choice, such as android_sdk .


1 Answers

From the documentation:

Starting with Tools R12, the SDK Manager offers a slightly better way to update the SDK from command-line.

Previously the "android update sdk --no-ui" command already allowed one to update from the command-line, but it had the annoying tendency of installing every single platform or add-on. There are now 30 or more packages available on the SDK repository, including 12 platforms; that's a lot to download when most people only need the most recent platform. Starting with R12, you can use combine new things:

  • "android list sdk" will connect to the remote repository and list all the packages available with an index number.

  • "android update sdk --no-ui" accepts a "--filter" argument that can take a package index, or a category name.

Here's an example in action:

enter image description here

There's still room for improvement, notably in a future release we'll work on the first install case and making the update smarter at figuring out what to get.

like image 51
Stephan Branczyk Avatar answered Oct 22 '22 12:10

Stephan Branczyk