Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I download the Android SDK without downloading Android Studio?

People also ask

Can Android SDK download without 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.

Can we install Android emulator without Android Studio?

Launch the “android” tool (./android if you are currently in the tools directory). 4. Tick off the “SDK Platform” for each version of Android that you'd like to use in your emulator. 5.


You can find the command line tools at the downloads page under the "Command line tools only" section.

enter image description here

These are the links provided in the page as of now (version 26.1.1):

  • Windows no installer: https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip

  • MacOSX: https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip

  • Linux: https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip

Be sure to have read and agreed with the terms of service before downloading any of the command line tools.

The installer version for windows doesn't seem to be available any longer, this is the link for version 24.4.1:

  • Windows installer: https://dl.google.com/android/installer_r24.4.1-windows.exe

Navigate to the "Get just the command line tools" section of the android downloads page, and download the tools for your system.

For Windows:

Extract the contents to C:\Android\android-sdk

Navigate to C:\Android\android-sdk\tools\bin and open a command line window
(shift + right click)

Run the following to download the latest android package:

sdkmanager "platforms;android-25" 

Update everything

sdkmanager --update

Other operation systems Do pretty much the same, but not using windows directories.

The sdkmanager page gives more info in to what commands to use to install your sdk.


Command-line approach

mkdir android-sdk
cd android-sdk
wget https://dl.google.com/android/repository/sdk-tools-linux-*.zip
unzip sdk-tools-linux-*.zip
tools/bin/sdkmanager --update

When executing the above commands, make sure that you replace * with an appropriate version number which you could find in the download page.

Installing packages

You can also use the sdkmanager to list and to install any specific packages needed.

tools/bin/sdkmanager --list
tools/bin/sdkmanager "platform-tools" "platforms;android–27" "build-tools;27.0.3"

FYI

sdk-tools-linux-*.zip only includes the command-line tools. This extracts content to a single directory named tools, like:

+- android-sdk
    +- tools

To get the SDK packages we could run:

tools/bin/sdkmanager --update

The sdkmanager accepts the following flag:

--sdk_root=<sdkRootPath>: Use the specified SDK root instead of the SDK 
                          containing this tool

But if we omit this flag, it assumes parent directory of tools directory as the sdk root, here in our case android-sdk directory.

If you check the android-sdk folder after running tools/bin/sdkmanager --update it will be like:

+- android-sdk
    +- tools
    +- emulator  
    +- platforms  
    +- platform-tool

If needed, also set ANDROID_HOME environment variable like:

export ANDROID_HOME=/path/to/android-sdk

What worked for me on Windows:

  1. Downloaded command line tools from https://developer.android.com/studio/index.html
  2. Put the whole tools folder from the ZIP archive to C:\Program Files (x86)\Android SDK\
  3. Launched tools\android.bat as administrator, which opened the usual SDK Manager window
  4. Installed required components. The files were downloaded to ...\Android SDK\ directory (that is build-tools, platforms, platform-tools, etc. directories appeared alongside tools inside ...\Android SDK\)
  5. Opened the Android project in Intellij IDEA, navigated to File->Project Structure->SDKs, and added Android SDK by directing to ...\Android SDK\ directory