Development of mobile applications for the Android operating system is impossible without the presence of an appropriate set of tools, which is known as Software Development Kit. This package contains the compilers, debuggers, emulators, and libraries needed to create, test, and publish code. For beginners, the process of initially setting up the development environment often becomes a stumbling block, since automatic downloading may fail or require manual configuration.
In this article, we will look in detail at how to properly download the SDK through the Android Studio graphical interface, how to install manually if there are problems with the network, and where to store platform files to save space on the system drive. Understanding the structure of the components will allow you to avoid common mistakes and quickly start writing code on Kotlin or Java.
The process of integrating development tools is closely related to the version of the IDE itself and the Internet connection settings. Sometimes the standard installation wizard freezes at the download stage, which requires user intervention in the configuration files or changing the proxy server. We will consider all the nuances so that your work environment is ready for productive work with minimal time wasted.
Automatic installation through the setup wizard
At the first start Android Studio after installation, the setup wizard is usually automatically activated, which offers to download all the necessary components. This path is the most preferable for most users, since the system itself determines compatible versions of platforms and build tools. You only need to confirm the license agreement and select a directory to place the files.
During the process, the wizard downloads Android SDK Platform-Tools, which contain command line utilities like adb and fastboot. The latest versions Build-Toolsare also downloaded, which are responsible for compiling the application into the APK installation package. If you missed this step when you first started, you can always return to it through the welcome screen menu by selecting the option Customize โ All Settings....
Sometimes the automatic process is interrupted due to an unstable connection or blocking of Google servers in your region. In this case, the system may offer to try downloading later or use a local archive. Don't panic if the progress bar is frozen at 99% - this often means that large archives are being unpacked, not downloaded.
โ ๏ธ Attention: Make sure that there is at least 10-15 GB of free space on the system disk before starting the automatic download. System and emulator image files take up a significant amount of space, and lack of space can lead to damage to the SDK directory structure.
โ๏ธ Check before installation
Manual loading of components via SDK Manager
If the automatic installation was not successful or you require specific versions of Android to test compatibility, you must use the built-in manager. You can find it in the IDE main menu by following the path Tools โ SDK Manager. This is the central hub for managing all components, where you can choose which packages should be installed on your computer.
The manager interface is divided into several tabs, each of which is responsible for its own type of resource. The SDK Platforms tab allows you to select specific versions of the operating system for which you plan to compile applications. Here it is important to note not only the latest version, but also several previous ones, in order to ensure support for user devices with different OS versions.
The SDK Tools tab contains system utilities. Here Android SDK Build-Tools, Android Emulator and Android SDK Platform-Toolsmust be installed. Also, developers often need NDK (Native Development Kit) to work with code in C/C++, but beginners may not need it at the start. The selection of components is confirmed by clicking the button Apply in the lower right corner of the window.
If loading into the SDK Manager is very slow or is interrupted, try in the proxy settings (File โ Settings โ Appearance & Behavior โ System Settings โ HTTP Proxy) to specify automatic detection or disable the proxy altogether.
With a manual download, you have complete control over what is installed on your system. This is especially useful when you need to download a system image for an emulator of a specific device model or install an older version of build tools to support legacy projects. The flexibility of this approach allows you to optimize disk space without downloading unnecessary packages.
Setting the path to the SDK directory
By default, Android Studio suggests installing the SDK in the hidden system folder of the user profile, the path to which usually looks like C:\Users\Name\AppData\Local\Android\Sdk on Windows or /Users/Name/Library/Android/sdk on macOS. This location is convenient for isolating access rights, but can be inconvenient if you have limited space on the system disk or plan to reinstall the OS.
You can change the directory path in the same window SDK Manager, in the field Android SDK Location. It is recommended to create a separate folder on another logical drive, for example D:\Android\SDK. This will make it easier to back up tools and allow you to use one set of SDKs for multiple versions of Android Studio if you are testing different IDE releases.
After changing the path, you need to make sure that the system environment variables are updated correctly. While modern IDEs often do this automatically, some third-party plugins or the command line may require you to manually enter paths to work. In particular, the path to the folder platform-tools must be added to the system variable PATH.
| Component | Purpose | Example path inside the SDK |
|---|---|---|
| Platform-Tools | ADB and Fastboot utilities | .../platform-tools/adb.exe |
| Build-Tools | Compilers and packers | .../build-tools/34.0.0/ |
| Platforms | Files of a specific version of Android | .../platforms/android-34/ |
| Emulator | Virtual device | .../emulator/qemu/ |
Moving the SDK to a separate disk protects your development tools from being lost when reinstalling the operating system and saves space on a fast system SSD.
Problem solving with download and update
The most common problem when downloading the SDK is connection errors with Google servers. This can manifest itself in the form of timeouts, SSL errors, or waiting forever for a response. Often the reason lies in the settings of the firewall, antivirus or corporate proxy, which blocks access to domains dl.google.com.
To diagnose the problem, you can try switching the boot protocol. In the SDK Manager settings there is an option Force https://... sources to be fetched using http://.... Enabling this checkbox sometimes helps to bypass problems with security certificates, although it reduces the security of the connection. It is also worth checking whether the antivirus is blocking the process. studio64.exe.
If the download of a particular package is constantly interrupted, you can try clearing the download cache. To do this, you need to go to the SDK temporary files folder (usually located in temp inside the SDK directory) and delete the contents. After restarting Android Studio, the system will try to download the files again, possibly from another mirror.
โ ๏ธ Attention: The interface and location of settings may differ slightly in different versions of Android Studio (Giraffe, Hedgehog, Iguana). If you do not find the option described, check the official documentation for your specific IDE build.
Working with the command line and sdkmanager
For advanced users and automation of build processes (CI/CD), a command line utility is provided sdkmanager. It allows you to install, update, and remove SDKs without launching the Android Studio GUI, which is convenient for scripts and server-side builds. It should be launched from the directory cmdline-tools or tools/bin.
The basic command syntax for installing the platform is as follows:
sdkmanager "platforms;android-34" "build-tools;34.0.0"
The first time you run the utility outside the IDE, you may be required to accept licenses. This is done with the command sdkmanager --licenses, after which you need to confirm consent several times by pressing the key y. Without this step, installation of components will be blocked by the system.
Using the command line makes it possible to precisely control the versions of installed tools, which is critical for the reproducibility of assemblies in the team. You can commit a specific version Build-Tools in the environment configuration script, ensuring that all developers in the project have an identical environment.
How to update all packages at once?
Use the sdkmanager --update command. It will check all installed components and download available updates for them, including system images and platform tools.
Storage optimization and versioning
Over time, the SDK folder can grow to tens of gigabytes due to the accumulation of old versions of platforms and tools that are no longer used in current projects. Regular cleaning of unnecessary components helps free up valuable disk space. In SDK Manager, you can uncheck unused versions and click Apply to delete them.
Particular attention should be paid to system images for the emulator. If you have downloaded images for Android 10, 11, 12 and 13, but are testing the application only on the latest two versions, you can safely delete the old images. They take up a lot of space, but you can always download them again if necessary. It is also recommended to use the function Offline Sourcesif you are working on a network with limited access.
For projects that require specific settings, it is useful to create isolated environments. However, in most cases, using a single global SDK for all projects is justified. The main thing is to ensure that the versions in the file correspond to the packages installed on the system. Where is the SDK folder physically stored after installation? By default on Windows, the path looks like how compileSdkVersion And targetSdkVersion in the file build.gradle corresponded to the packages installed on the system.
Where is the SDK folder physically stored after installation?
By default on Windows the path looks like C:\Users\YourName\AppData\Local\Android\Sdk. The AppData folder is hidden, so to access it you need to turn on show hidden items in Explorer or enter the path manually in the address bar.
Can I copy the SDK folder to another computer?
Yes, you can. It is enough to copy the entire SDK directory to a new computer and specify the path to it in the Android Studio settings. However, after this, it is recommended to launch SDK Manager and click the update button to double-check the integrity of the files and update the paths in the configuration scripts.
What to do if SDK Manager shows an empty list of packages?
This often happens when there are problems with DNS or blocking of Google domains. Try changing the DNS servers in your network settings to public ones (for example, from Google 8.8.8.8) or temporarily disabling antivirus software that can filter IDE traffic.
Do you need to install the NDK for regular application development?
No, for standard development in Java or Kotlin, a native development kit (NDK) is not required. It is needed only if you plan to integrate libraries written in C or C++ into the application, or work with low-level access to hardware.