Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install SDK manager on linux ubuntu 16.04?

I was trying to install Android SDK with the help of the SDK command line tools downloaded from the link https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip on my Linux Ubuntu 16.04 PC.

i run the command following command for installation

./android update sdk

but the installation has stopped and gave the following message on terminal ------------------------------------------------------------------------------------------------------------------------------------


The "android" command is deprecated. For manual SDK, AVD, and project management, please use Android Studio. For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager


"android" SDK commands can be translated to sdkmanager commands on a best-effort basis. Continue? (This prompt can be suppressed with the--use-sdk-wrapper command-line argument or by setting the USE_SDK_WRAPPER environment variable) [y/N]: y

Running /home/user/Android/Sdk/bin/sdkmanager --update

Warning: java.net.SocketException: Connection reset

Warning: Failed to download any source lists!

Done

-----------------------------------------------------------------------------------------------------------------------------------

how to solve this error.or suggest me a way to install android sdk on my linux pc without installing android studio.

like image 652
divakar Avatar asked Aug 21 '17 09:08

divakar


People also ask

How install SDK tools in Linux?

You will need to download the Android SDK without Android Studio bundled. Go to Android SDK and navigate to the SDK Tools Only section. Copy the URL for the download that's appropriate for your build machine OS. Unzip and place the contents within your home directory.


Video Answer


1 Answers

A bit late, but in the same situation. It looks like this isn't an error, but the way the tools evolved: they are pushing users to use Android Studio if they want the GUI for the sdk manager, it's usable only from the IDE.

You still have the command line available at bin/sdkmanager in this folder from the download, and instructions can be found here, but they are not great, either, so I'll share what I did:

  1. downloaded the latest compressed file from this page (link way down there)
  2. unzipped somewhere (I chose /opt/Android/android-sdk)
  3. created a symlink to add sdkmanager to my path (ln -s /opt/Android/android-tools/bin/sdkmanager ~/.local/bin/sdkmanager)
  4. installed platform tools and build tools for kitkat and up using sdkmanager "platform-tools" "platforms;android-19" "build-tools;19.1.0" (sudo may be needed)

You can check the versions available using sdkmanager --list, and figure what you need to support and download tools for other versions. The download will not show any kind of progress, it'll only tell you it's done after a while.

I suppose it's not a big deal to keep Android Studio installed solely to have access to the sdk manager GUI, but I'll make do with the command line tools. That's very shady of Google, specially to people not really into their hacked up Intellij version.

like image 189
mkvlrn Avatar answered Oct 21 '22 17:10

mkvlrn