Developing applications for the most popular mobile operating system in the world begins with properly setting up the environment. When you first launch Android Studioyou are faced with a question that can confuse even experienced programmers: which Software Development Kit (SDK) components should you install? An error at this stage can lead to code incompatibility, problems with the emulator, or the inability to publish the project on Google Play. The choice of components affects not only the build speed, but also the devices on which your application can run.
In this article, we will analyze in detail the structure of SDK Manager and determine installation priorities so that you do not waste gigabytes of disk space on unnecessary files. We'll look at the differences between Platform Tools, Build Tools and system images, and also discuss strategies for supporting different versions of Android. Understanding these nuances is critical to creating stable and performant code that will be relevant in the long term.
The basic architecture of the Android SDK and the necessary components
Before you click the "Install" button, you need to understand what the development ecosystem consists of. Android SDK it is not a monolithic block, but a collection of disparate packages, each of which is responsible for its own task. The core of the system is Platform Toolswhich includes utilities adb and fastboot. Without them, it is impossible to debug the application on a real device or interact with the smartphone bootloader. These tools are updated regardless of platform versions and should be present in any work environment.
The second critical element is Build Tools. This is a set of compilers and utilities (such as aapt, d8, zipalignthat convert your source code into a finished .apk or .aab file. The Build Tools version is often bound in the project build.gradleconfig file. If you try to build a project using a different version of the tools than the one specified in the build script, Gradle it will throw a compatibility error. Therefore, installing the current stable version of Build Tools is a mandatory step.
The third component is yourself Android SDK Platforms. Here you select specific versions of the operating system (API levels) for which you will write code. For example, installing Android 14 (API 34) gives you access to new system features such as improved notifications or predictive animations. However, you should not install all available versions in a row. To start development, one or two latest versions are enough to cover most modern devices on the market.
โ ๏ธ Attention: Never delete the folder with installed Build Tools if you have old projects that are strictly tied to a specific version in the configuration file. This will break the legacy code build.
To save disk space, disable automatic downloading of documentation and code samples (Samples) in the SDK Manager settings if you plan to read them online.
Strategy for selecting API versions for new projects
Selecting a target API version (targetSdkVersion) and the minimum version (minSdkVersion) is a balance between the availability of new functions and audience coverage. Google requires that new applications in the Play Market use the current one. targetSdkVersion. Ignoring this rule will result in the application being rejected by moderation. Therefore, when creating a new project, always focus on the latest stable version of Android available in the SDK Manager.
On the other hand, the parameter minSdkVersion determines how old devices will be able to run your application. Setting the value too low (for example, API 16 for Android 4.1) will require writing a lot of shims and compatibility checks, making the project more difficult to maintain. Modern statistics show that the vast majority of users work on devices with Android 8.0 and higher. Therefore, there is no point in spending resources on supporting extremely old versions, unless it is a corporate requirement.
When working with new APIs, you should remember the concept of backward compatibility. Libraries AndroidX allow you to use new features on older devices, but only if you configure the dependencies correctly. Installing legacy platforms in SDK Manager only makes sense if you need to test the behavior of the application on specific versions of the system or you are supporting an old project.
Assigning and selecting system images (System Images)
System images are required for the emulator to work. Android Virtual Device (AVD). Without them, you will not be able to run a virtual device on your computer to test the interface. When choosing an image, it is important to pay attention not only to the Android version, but also to the processor architecture. For most modern computers with Intel or AMD processors, the optimal choice is images marked Google APIs or Google Play and architecture x86_64.
Images with architecture arm64-v8a are designed to emulate operation on real mobile processors. They run significantly slower on regular PCs because they require translation of instructions. They should be installed only if your application uses specific native libraries (JNI/NDK), which critically depend on the ARM architecture and do not work correctly on x86. In other cases, using x86_64 will ensure maximum emulator performance.
It is also worth paying attention to the type of image. Versions with the logo Google Play contain pre-installed Google services (Maps, Location, In-App Billing), which allows you to test functionality that depends on the Google ecosystem directly in the emulator. Regular "Google APIs" images only contain development frameworks, but no app store. The choice depends on which services are integrated into your application.
| Image type | Architecture | Availability of Google services | Recommendation |
|---|---|---|---|
| Default | x86_64 | No | For testing the basic UI |
| Google APIs | x86_64 | Partially (Framework) | For development using maps and locations |
| Google Play | x86_64 | Full set | For testing monetization and authorization |
| Android TV | x86_64 | Depends on the version | Only for development for TV |
โ ๏ธ Attention: System images take up a huge amount of disk space (from 2 to 5 GB each). Download only those versions that you actually plan to use for testing in the near future.
Tools for working with native code (NDK and CMake)
If your application does not use native code in C or C++, you do not need to install Android NDK (Native Development Kit). This component is intended for developers who need high computing performance (for example, in games, video processors or cryptography) or who use ready-made native libraries. For standard Kotlin or Java applications, the presence of the NDK is redundant and only clutters the disk.
Along with the NDK, you often need to install CMake a build system that compiles native code. In modern versions of Android Studio, CMake is often offered as a separate component in the SDK Manager. If your project contains a file CMakeLists.txt or uses ndk-build, make sure that the versions of these tools meet the requirements of the project. Incompatibility between CMake versions can lead to errors in linking native libraries.
For most novice developers and those who create typical business applications, this section can be safely skipped. However, if you plan to integrate engines like Unity or Unreal Engine, or work with real-time signal processing, having an up-to-date version of the NDK will be a prerequisite for successful compilation of the project.
Why do you need LLDB as part of the NDK?
LLDB is a debugger for native code. It allows you to set breakpoints inside C++ code and analyze memory, which is indispensable when searching for memory leaks in native libraries.
Step-by-step installation instructions via SDK Manager
The process of installing components is intuitive, but has several important nuances that should be taken into account to avoid errors. You can launch the manager both from the Android Studio welcome screen and through the menu of an already open project. It is recommended to use the "SDK Platforms" and "SDK Tools" modes separately in order to clearly control the installed packages.
First go to the SDK Platformstab. A list of available Android versions will be displayed here. It is recommended to select the latest stable version (for example, Android 14 or 15) and click "Show Package Details" to ensure that all subcomponents are selected, including the system image. Then go to the SDK Toolstab. Here you need to check the boxes Android SDK Build-Tools, Android SDK Platform-Tools and, if necessary, Android Emulator.
- โ
Click the button
Applyto start downloading the selected packages. - โ Accept the License Agreements for each component, otherwise the installation will be interrupted.
- โ Wait for the download to complete, as an interruption may damage the cache files.
- โ After installation, restart Android Studio to correctly index the new paths.
โ๏ธ Checking the SDK installation
It is important to ensure that the path to the SDK did not contain Cyrillic characters or spaces. This is a common cause of errors on Windows operating systems. The standard path C:\Users\Username\AppData\Local\Android\Sdk is the safest and recommended option. If you change the SDK location manually, make sure that the environment variable ANDROID_HOME points to the new directory.
โ ๏ธ Note: The Android Studio interface and menu layout may vary slightly depending on the IDE version (Giraffe, Hedgehog, Iguana). Always check the official documentation if you cannot find the menu item you need.
Storage optimization and version control
Over time, the SDK folder can grow to tens of gigabytes, taking up valuable space on the system drive. Regularly cleaning out unused versions is a good practice to keep things organized. SDK Manager allows you to remove older versions of Platform Tools and Build Tools that are not used in any of your current projects. However, be careful: deleting the version that is needed to build the old project will require downloading it again.
To manage versions in the project itself, use the file build.gradle (module level). This is where specific versions of the compiler and tools are set. Using a wildcard character (for example, buildToolsVersion "34.0.+") can cause unpredictable behavior when updating tools, so it is better to explicitly specify the specific version, for example 34.0.0. This ensures that the build will be reproducible on any development computer.
It is also worth considering moving the SDK folder to another drive if the SSD system partition is limited. In the Android Studio settings (Appearance & Behavior โ System Settings โ Android SDK) you can change the path to the SDK. After the transfer, do not forget to update the environment variables in the operating system so that the command line and other tools can find utilities like adb.
Explicitly specifying tool versions in gradle files protects the project from breakdowns during automatic SDK updates in the future.
Frequently asked questions (FAQ)
Do I need to install all available versions of the Android SDK?
No, this is not required and is even harmful. Install only the version that is indicated as targetSdkVersion in your project, and perhaps one or two previous ones to test compatibility. The remaining versions can be downloaded later if necessary.
What to do if Gradle cannot find the installed version of Build Tools?
Check whether the version specified in the file build.gradlematches the version installed in the folder build-tools. Often, updating the Android Gradle Plugin to the latest version or explicitly installing the missing version through the SDK Manager helps.
Can I remove the Android Emulator if I am only testing on a real phone?
Yes, the Android Emulator component is optional. If you are using a physical device for USB debugging, you can safely remove the emulator via SDK Manager to free up a few gigabytes of space.
What is the difference between SDK Platform and System Image?
SDK Platform contains resource and library files necessary for compilation applications for a specific version of Android. System Image is a full-fledged image of the operating system, required only for launch emulator. To build the code, Platform is enough; for testing on a virtual machine, you need Image.
How to update SDK Tools to the latest version?
Open SDK Manager, go to the "SDK Tools" tab, check the box for the required component (for example, Platform-Tools) and click "Update". If the checkbox is already checked, but the version is old, try unchecking it, applying the changes, and then installing it again.