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
.apkor.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).
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:
- Open
File โ Settings โ Appearance & Behavior โ System Settings โ HTTP Proxy. - Specify proxy data or select
Auto-detect proxy settings. - 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:
Open Android Studio and wait for the initial setup to complete. select
Do not import settings.Go to
More Actions โ SDK Manager(gear icon in the upper right corner) or clickFile โ Settings โ Appearance & Behavior โ System Settings โ Android SDK.In the window that opens you will see two tabs:
SDK Platforms(platforms) andSDK 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
adbandfastboot. - ๐ 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 foldercd /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:
- Download the necessary packages from page archives.
- Unpack them into
[SDK_PATH]/platforms,[SDK_PATH]/build-toolsetc. - 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:
- Open
Control Panel โ System โ Advanced system settings โ Environment variables. - In section
System variablesfindPathand clickEdit. - Add paths:
%ANDROID_HOME%\platform-tools%ANDROID_HOME%\tools
%ANDROID_HOME%\tools\bin - Create a new variable
ANDROID_HOMEwith valueC:\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/Sdkexport 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:
- Open
SDK Managerin Android Studio. - Click
Update Allor select specific packages. - 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 compatiblecompileSdkVersion,targetSdkVersionandbuildToolsVersion. - ๐ Cache Gradle โ sometimes cleaning through
File โ Invalidate Caches / Restart. - ๐ง helps Project settings - in
File โ Project Structure โ SDK Locationthe 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 Imagesfor the emulator (leave only x86_64 or ARM64). - ๐๏ธ
Sources for AndroidiDocumentationif 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_64instead ofARM(works faster on most PCs). - ๐ฅ๏ธ Reduce the resolution of the emulated device (for example,
720pinstead of1080p).
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/nanofor 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:
- Install Android Studio on a new computer.
- In the settings, specify the path to the copied SDK folder (
File โ Settings โ Android SDK โ Android SDK Location). - 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-backupwhen 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:
- Tick the checkbox
Android 9.0 (Pie, API 28). - Click
Show Package Detailsand select only the necessary components (for example,Android SDK Platform 28withoutSourcesandImages). - Click
Applyand 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.