Developing mobile applications for Android starts with setting up the working environment, and its key component is Android SDK (Software Development Kit). Without this set of tools, you will not be able to compile projects, test them on emulators, or connect real devices. However, novice developers often have questions: how to download the SDK correctly, which components to choose, and why the installation process sometimes takes hours?

In this article we will analyze all the stages - from the initial download of the SDK through Android Studio to the intricacies of configuration for specific versions. Android. You'll learn how to avoid common pitfalls (such as low disk space or version conflicts), which SDKs are must-haves for modern development, and how to streamline the upgrade process. And if you work in a team or on a weak PC, you will find tips on saving resources without losing functionality.

Important: the instructions are relevant for the latest versions Android Studio Giraffe (2022.3.1) and newer, but the basic principles also apply to older releases. If you use Flutter, React Native or other frameworks, the SDK installation process remains the same.

What is the Android SDK and why do you need it?

Android SDK is a set of tools that includes:

  • ๐Ÿ“ฆ Libraries and APIs for interacting with functions Android (camera, GPS, sensors, etc.).
  • ๐Ÿ–ฅ๏ธ Emulators for testing applications on different OS versions and devices.
  • ๐Ÿ”ง Command line tools (adb, fastboot, aapt).
  • ๐Ÿ“ก Drivers for connecting physical devices to a PC.

Without SDK you will not be able to:

  • โŒ Build (build) a project in .apk or .aab.
  • โŒ Run the application on an emulator or a real smartphone.
  • โŒ Use specific functions Android (for example, working with Jetpack Compose or CameraX).

It is worth noting that the SDK is not a monolithic package. You download only those components that are needed for your project. For example, if you are developing under Android 13, there is no point in installing the SDK for Android 5.0 (unless you need support for legacy devices).

๐Ÿ“Š Which version of Android do you most often use for development?
Android 13 (API 33)
Android 12 (API 31)
Android 11 (API 30)
Android 10 (API 29)
Other version

Preparing to install the SDK: system requirements and settings

Before downloading the SDK, make sure that your computer meets the minimum requirements:

Component Minimum requirements Recommended requirements
Operating system Windows 8/10 (64-bit), macOS 10.14, Linux (GNU C Library 2.31) Windows 11, macOS 13 Ventura, Ubuntu 22.04 LTS
RAM 4 GB (8 GB for the emulator) 16 GB+ (for multiple emulators)
Disk space 2 GB (SDK only) 10 GB+ (with emulators and cache)
Java JDK 11 JDK 17 (for Android Gradle Plugin 8.0+)

Pay special attention free disk space. SDKs and emulators can take up tens of gigabytes, especially if you install multiple versions Android. We recommend:

  • ๐Ÿ’พ Select a separate disk partition for Android Studio and SDK (for example, D:\Android\SDK).
  • ๐Ÿงน Regularly clear the cache via File โ†’ Settings โ†’ Appearance & Behavior โ†’ System Settings โ†’ Android SDK โ†’ SDK Tools โ†’ Show Package Details.
  • โ˜๏ธ Use cloud emulators (for example, Firebase Test Lab) to save space.
โš ๏ธ Attention: If you install the SDK on macOS with a chip Apple Silicon (M1/M2), some tools (for example, an emulator x86) may not work. In this case, select images ARM64 or use Rosetta 2.

Also check the settings proxy and firewall. If you are on a corporate network, downloading the SDK may be blocked. In this case:

  1. Open File โ†’ Settings โ†’ Appearance & Behavior โ†’ System Settings โ†’ HTTP Proxy.
  2. Specify proxy data or select Auto-detect proxy settings.
  3. If the problem persists, download the SDK via SDK Command-line Tools (more on this below).

Step-by-step guide: how download SDK via Android Studio

The easiest way to install the SDK is to use the built-in SDK Manager V Android Studio. Follow these steps:

  1. Open Android Studio and wait for the initial setup to complete. select Do not import settings.

  2. Go to More Actions โ†’ SDK Manager (gear icon in the upper right corner) or click File โ†’ Settings โ†’ Appearance & Behavior โ†’ System Settings โ†’ Android SDK.

  3. In the window that opens you will see two tabs: SDK Platforms (platforms) and SDK Tools (tools). Let's start with the first one.

Step 1: Selecting platforms (SDK Platforms)

All available versions are listed here AndroidTo start development, just install:

  • ๐Ÿ“ฑ Android 13 (Tiramisu, API 33) โ€”the latest stable version.
  • ๐Ÿ“ฑ Android 12L (API 32) โ€”to support tablets and foldable devices.
  • ๐Ÿ“ฑ Android 11 (API 30) โ€”if you need to cover more than 90% of devices (according to data Google Play Console).

Do not install all versions in a row - this will take up a lot of space. Instead:

Install the latest stable version of Android

Add the version with the greatest coverage of devices (check in Google Play Console)

Tick only "Android SDK Platform" (without "Sources" and "Images" if not needed)

Use "Show" Package Details" to select specific components -->

Step 2: Installing tools (SDK Tools)

Go to the tab SDK Tools and check:

  • ๐Ÿ”ง Android SDK Build-Tools โ€”needed to build projects.
  • ๐Ÿ–ฅ๏ธ Android Emulator โ€”to run virtual devices.
  • ๐Ÿ“ก Android SDK Platform-Tools โ€” include adb and fastboot.
  • ๐Ÿ” Android SDK Command-line Tools โ€” for working through the terminal.

Other tools (for example, NDK or Google Play Licensing Library) install only when necessary.

Step 3: Start installation

Click Apply or OK, confirm the license agreements and wait for the download to complete. The installation time depends on the Internet speed and the selected components.

โš ๏ธ Attention: If the installation is stuck at the "Running jobs" stage, check if the antivirus (Avast, Kaspersky) is blocking access to the SDK files. Add the folder with the SDK to the exceptions.

Alternative ways to download the SDK

If Android Studio cannot download the SDK (for example, due to network problems), use alternative methods:

Method 1: Command-line Tools

Download SDK Command-line Tools from official website (section Command line tools only). Unpack the archive and run the installation through the terminal:

# Go to the tools folder

cd /path/to/sdk/tools/bin

Install the necessary packages (example for Android 13)

sdkmanager "platforms;android-33" "build-tools;33.0.0" "emulator"

Method 2: Offline installation

If you have a slow Internet, download the SDK components on another PC and transfer them to the folder:

  1. Download the necessary packages from page archives.
  2. Unpack them into [SDK_PATH]/platforms, [SDK_PATH]/build-tools etc.
  3. In Android Studio click Sync Project with Gradle Files.

Method 3: Using mirrors

In some countries access to servers Google restricted. In this case:

  • ๐ŸŒ Set up a repository mirror in the file [SDK_PATH]/extras/android/m2repository/package.xml.
  • ๐Ÿ”— Use alternative sources, for example Tencent Mirror or Alibaba Cloud (look for current addresses on developer forums).
๐Ÿ’ก

If the SDK download is interrupted with the "Connection reset" error, try disabling IPv6 in the network settings or using a VPN.

Setting environment variables for the SDK

To make the SDK tools (adb, fastboot, sdkmanager) available from any directory, add them to environment variables:

For Windows:

  1. Open Control Panel โ†’ System โ†’ Advanced system settings โ†’ Environment variables.
  2. In section System variables find Path and click Edit.
  3. Add paths:
    %ANDROID_HOME%\platform-tools
    

    %ANDROID_HOME%\tools

    %ANDROID_HOME%\tools\bin

  4. Create a new variable ANDROID_HOME with value C:\Users\Your_name\AppData\Local\Android\Sdk (or your path to the SDK).

For macOS/Linux:

Add to file ~/.bashrc or ~/.zshrc:

export ANDROID_HOME=$HOME/Android/Sdk

export PATH=$PATH:$ANDROID_HOME/platform-tools

export PATH=$PATH:$ANDROID_HOME/tools

export PATH=$PATH:$ANDROID_HOME/tools/bin

Then do:

source ~/.bashrc # or source ~/.zshrc

Check that the settings are correct by running in the terminal:

adb --version

If the command displays the version (for example, Android Debug Bridge version 1.0.41), everything is configured correctly.

โš ๏ธ Attention: On Windows after updating the SDK path in Path may go astray. Check them after each major update Android Studio.

Updating the SDK and solving common errors

SDK requires regular updates, especially if you work with beta versions of Android or new libraries. To update components:

  1. Open SDK Manager in Android Studio.
  2. Click Update All or select specific packages.
  3. Confirm changes and wait for completion.

Typical errors and their solutions:

Error Cause Solution
Failed to install Android SDK: "Timeout" Slow Internet or proxy blocking Use a VPN or download packages manually
No devices available to adb Device drivers are not installed Download Google USB Driver or driver from the manufacturer's website
Emulator: PANIC: Missing emulator engine app Not installed Android Emulator or incorrect AVD settings Reinstall the emulator via SDK Manager
Gradle sync failed: "Failed to find Build Tools" Version mismatch buildToolsVersion in build.gradle and installed Update buildToolsVersion or install the required version via SDK Manager

If after updating the SDK projects no longer build, check:

  • ๐Ÿ“„ File build.gradle โ€” are versions compatible compileSdkVersion, targetSdkVersion and buildToolsVersion.
  • ๐Ÿ”„ Cache Gradle โ€” sometimes cleaning through File โ†’ Invalidate Caches / Restart.
  • ๐Ÿ”ง helps Project settings - in File โ†’ Project Structure โ†’ SDK Location the correct path to the SDK must be specified.
What to do if the SDK Manager does not open?

If nothing happens when you click on SDK Manager try:

1. Close all projects in Android Studio (File โ†’ Close Project).

2. Run Android Studio as administrator (on Windows).

3. Delete the folder .android in the user's home directory and restart the IDE.

4. If the problem persists, reinstall Android Studio cleaning the settings.

SDK optimization: how to save space and time

The complete installation of the SDK may take up to 50 GB or more, but most components are not needed for everyday development. Here's how to optimize your usage:

1. Removing unnecessary versions

Via SDK Manager remove:

  • ๐Ÿ—‘๏ธ Outdated platforms (for example, Android 4.4 KitKatif you do not support older devices).
  • ๐Ÿ—‘๏ธ Unnecessary System Images for the emulator (leave only x86_64 or ARM64).
  • ๐Ÿ—‘๏ธ Sources for Android i Documentationif you do not use them locally (you can watch online).

2. Setting up the emulator

Emulators Android take up a lot of space and resources. Optimize them:

  • ๐Ÿ–ฅ๏ธ Use Quick Boot (saving the emulator state).
  • ๐Ÿ–ฅ๏ธ Choose x86_64 instead of ARM (works faster on most PCs).
  • ๐Ÿ–ฅ๏ธ Reduce the resolution of the emulated device (for example, 720p instead of 1080p).

3. General tips

  • ๐Ÿ”„ Clear the cache regularly via File โ†’ Invalidate Caches.
  • ๐Ÿ“ Store the SDK on SSD โ€”this will speed up the assembly of projects.
  • โ˜๏ธ For team work, use Gradle Cache or Build Cache.
๐Ÿ’ก

Minimum set to start development: SDK Platform (1 version), Build-Tools, Platform-Tools and Emulator. Everything else can be installed later.

FAQ: Frequently asked questions about the SDK in Android Studio

Is it possible to use the SDK without Android Studio?

Yes, you can work with the SDK via command lineusing sdkmanager, adb and other tools. However, for full development (with Gradle, debugging and emulator) Android Studio remains the most convenient solution:

  • ๐Ÿ–ฅ๏ธ Visual Studio Code with plugins for Android.
  • ๐Ÿง Terminal + vim/nano for editing code.

But in this case you will have to manually configure build.gradle, connect dependencies and manage emulators.

How to transfer the SDK to another computer?

Copy the folder with the SDK (usually this C:\Users\Your_name\AppData\Local\Android\Sdk or ~/Android/Sdk) to the new PC and:

  1. Install Android Studio on a new computer.
  2. In the settings, specify the path to the copied SDK folder (File โ†’ Settings โ†’ Android SDK โ†’ Android SDK Location).
  3. Update components via SDK Manager (some packages may require re-installation).

If you use Gradle, also copy the folder .gradle from your home directory to save time downloading dependencies.

Why does the SDK take up so much space?

The main "eaters" of space:

  • ๐Ÿ“ฆ Emulators โ€”each System Image weighs 1โ€“2 GB.
  • ๐Ÿ“ฆ Gradle cache โ€”can grow up to 10+ GB.
  • ๐Ÿ“ฆ Several versions of SDK Platform โ€”each takes ~500 MB.
  • ๐Ÿ“ฆ Logs and temporary files โ€”clean the folder .android/avd.

To reduce the volume:

  • Remove unnecessary System Images via AVD Manager.
  • Limit the number of simultaneously installed SDK versions.
  • Use --no-backup when creating emulators.
How to download the SDK for a specific version of Android (for example, Android 9 Pie)?

Open SDK Manager, go to the tab SDK Platforms and:

  1. Tick the checkbox Android 9.0 (Pie, API 28).
  2. Click Show Package Details and select only the necessary components (for example, Android SDK Platform 28 without Sources and Images).
  3. Click Apply and wait for loading.

If the required version is not in the list, add it manually via SDK Manager โ†’ Edit โ†’ Add Custom SDK or download from archive.

Is it possible to use the SDK on several computers at the same time?

Technically yes, but:

  • ๐Ÿ”„ Licenses: some components (for example, Google Play Services) require acceptance of license agreements on each device.
  • ๐Ÿ”„ Paths: projects Gradle must specify the correct paths to the SDK for each PC.
  • ๐Ÿ”„ Updates: synchronize SDK versions on all machines to avoid build conflicts.

The best solution for team work is to use CI/CD (for example, GitHub Actions or GitLab CI), where the SDK is installed automatically during assembly.