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.
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.
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:
/opt/Android/android-sdk
)ln -s /opt/Android/android-tools/bin/sdkmanager ~/.local/bin/sdkmanager
)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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With