Development of mobile applications for the Android platform does not begin with writing code, and from the preparation of the foundation - the development environment. Android SDK (Software Development Kit) is an integral part of this process, providing the tools, libraries and emulators necessary for creating, debugging and testing apps. Without a correctly installed SDK, launching a project in Android Studio is impossible, since the compiler simply will not find the necessary definitions of classes and system resources.

Many novice developers encounter difficulties already at the initial configuration stage. There is often confusion between installing the IDE itself and setting up the development tools, which actually live in separate directories. In this article, we will analyze in detail the process of integrating components, check environment variables and learn how to manage platform versions through the built-in manager.

Even if you just downloaded the installer, the system may require manual configuration of paths or downloading additional packages for specific versions of Android. Understanding the directory structure and operating logic SDK Manager will save you hours of searching for errors in the build logs in the future.

Preparing for installation and selecting components

Before you start downloading gigabytes of data, you need to determine the goals of your project. Android Studio by default it suggests installing a basic set tools, but this is often not enough for professional development. You will need to select the specific versions Android APIfor which you plan to write code, as well as build tools.

The key element is Platform Tools, which includes the utilities adb and fastboot. These apps allow you to interact with physical devices and emulators, install applications and read system logs in real time. Without them, debugging turns into guessing on coffee grounds.

It is also worth paying attention to the package Build Tools. This is a set of compilers and utilities that convert your source code into a format that the Android operating system can understand. The version of these tools must match your project's requirements as specified in the configuration file build.gradle.

๐Ÿ’ก

Always install the latest stable version of Build Tools, even if your project requires an older one - they are backwards compatible and contain important security fixes.

Don't forget about System Images. If you plan to test the application on an emulator, you will need firmware files for specific versions of Android. Loading them can take a significant amount of time, so it is better to select only those versions that are actually needed in your work.

SDK integration through the Android Studio installation wizard

The easiest and most reliable way to get a working set of tools is to use the built-in setup wizard when you first start Android Studio. When you first open the app, you will be greeted by a welcome window where you need to select the option Custom (Custom) installation to control the process.

At the stage of selecting components, the wizard will prompt you to tick the required packages. The system will automatically suggest the installation path, which by default is located in the user's hidden folder. For Windows this is usually C:\Users\User_Name\AppData\Local\Android\Sdk, and for macOS and Linux - a folder Android/Sdk in the home directory.

If you skipped this step or decided to change the location of the files later, no need to panic. All settings are available within the development environment itself. Just go to the menu File โ†’ Settings (or Android Studio โ†’ Preferences on Mac), then select the section Appearance & Behavior โ†’ System Settings โ†’ Android SDK.

  • ๐Ÿ“‚ Check the field Android SDK Location โ€”the current path to the folder with tools is displayed here.
  • ๐Ÿ“ฆ In the list SDK Platforms check the Android versions that are needed to compile projects.
  • ๐Ÿ›  In the SDK Tools tab, make sure that Android SDK Build-Tools and Platform-Tools are installed.
  • ๐ŸŒ To work with the emulator, check the availability Android Emulator in the list of tools.
๐Ÿ“Š Which version of Android do you plan to use as the minimum?
Android 10
Android 11
Android 12
Android 13 and higher

After making changes, press the button Apply. The process of downloading and installing the selected components will begin. The progress bar will show the download status, and in case of errors, the network will offer to try again or change the proxy settings.

Manually setting paths and environment variables

Sometimes the automatic installation does not work correctly, or you need to use the SDK tools from the command line in any directory in the terminal. In this case, manual registration of paths in system environment variables is required. This is critical for the operation of automation scripts and third-party utilities.

In the Windows operating system, open system properties and go to the โ€œEnvironment Variablesโ€ section. You need to find the variable Path in the list of system variables and add there the paths to the folders platform-tools and tools inside your SDK directory.

C:\Users\Name\AppData\Local\Android\Sdk\platform-tools

C:\Users\Name\AppData\Local\Android\Sdk\tools

For Linux and macOS users, the process is slightly different. You need to edit the shell configuration file, for example .bashrc or .zshrc, adding variable export lines there. This will allow you to call commands adb without specifying the full path.

โš ๏ธ Attention: If you have changed environment variables, be sure to restart the terminal or command line. Changes are not applied to already open console windows, and commands may still not be found.

After configuration, check the functionality by entering the command in the terminal adb version. If the system displays the tool version number, it means that the path is correct and the integration was successful. Otherwise, check for typos in the paths.

โ˜‘๏ธ Checking environment variables

Done: 0 / 5

Managing platform versions and updates

The world of Android is constantly evolving, and new versions of the operating system are released regularly. SDK Manager allows you to flexibly manage installed versions, downloading new ones and deleting them outdated ones that take up disk space. This is especially true, since a complete set of all versions can take up tens of gigabytes.

In the manager interface you will see a list of available platforms indicating the installation status. The API level is displayed next to each version (for example, API 33 for Android 13). To compile a project, one or two latest versions are usually sufficient, but older releases may be required for compatibility testing.

Component Purpose Required Size (approximately)
Android SDK Platform Libraries for compilation for a specific OS version Yes (minimum 1) 50-100 MB
SDK Build-Tools Compilation utilities (dx, zipalign, etc.) Yes 100-200 MB
Platform-Tools Debugging tools (adb, fastboot) Yes 10-20 MB
System Image System image for the emulator No (if there is a device) 1-3 GB

When updating components, the manager may offer to accept new license agreements. This is standard procedure and requires confirmation before downloading proprietary software or updated Google libraries. Ignoring this step will result in a project build error.

What to do if the update is stuck?

If loading components is stuck at a certain percentage, try clearing the manager cache. Close Android Studio, delete the .android folder in your home directory, and run the installation again. Also check your antivirus, which may be blocking the connection.

Solving common installation problems

The installation process does not always go smoothly. One of the most common problems is the low disk space error. Android SDK requires significant free space, especially if you are loading multiple system images for emulation. Make sure that there is at least 10-15 GB available on the system partition.

Another common situation is a version conflict. Sometimes a project requires a specific version Build Toolsthat is not installed by default. In this case, the build will fail with a message about_missing_ component. The solution is simple: open the SDK Manager and install exactly the version that Gradle requests.

โš ๏ธ Attention: Never move the SDK folder manually through Explorer after installation. This will break internal links and config files. If you need to change the location, do it only through the Android Studio settings.

Network problems can also prevent downloads. If you are in a region with limited access to Google servers, you may need to configure an HTTP proxy directly in the IDE settings. This is done in the section Appearance & Behavior โ†’ System Settings โ†’ HTTP Proxy.

In rare cases, download files may be damaged. The manager has an integrity check function, but if errors are repeated, try clearing the folder temp inside the SDK directory and restart the download process.

๐Ÿ’ก

Most installation errors can be resolved by checking the free disk space and the correctness of the network proxy settings in the development environment itself.

Installation verification and first launch

After completing all the settings, you need to make sure that the environment is ready for use. Create a new empty project in Android Studio and wait for Gradle to sync. If there are no red error indicators in the lower status bar, then the paths to the SDK are defined correctly.

Try running the project on an emulator. To do this, press the button Run (green triangle). If the emulator starts and the application is installed, it means that the component Android Emulator and system images are working correctly. Connecting a physical device via USB will also check operation adb.

For a deep test, open a terminal inside the IDE and run the command adb devices. The list should display the connected device or running emulator with a unique serial number. This confirms that communication between the IDE and debugging tools is configured correctly.

  • โœ… The project is created without compilation errors.
  • โœ… The emulator starts and displays the Android desktop.
  • โœ… The command adb devices sees active devices.
  • โœ… In the SDK manager, all necessary components are marked as installed.

Now your working environment is completely ready. You can start writing code knowing that all the necessary libraries and tools are in place and functioning properly.

Where is the default Android SDK folder physically located?

The path depends on the operating system. On Windows this is usually C:\Users\Name\AppData\Local\Android\Sdk. On macOS the path looks like /Users/Name/Library/Android/sdk, and on Linux it looks like /home/Name/Android/Sdk. The exact path can always be viewed in the Android Studio settings.

Is it possible to install the SDK in another folder on drive D?

Yes, this is possible and is often recommended so as not to clog up the system disk. The first time you run the installation wizard, select the Custom option and specify the desired path. If the SDK is already installed, you can transfer it, but then you must specify a new path in the IDE settings and environment variables.

What to do if the SDK Manager does not see the update?

Try to force update the package lists by clicking the update button in the manager interface. If this doesn't help, check your proxy or firewall settings. Sometimes clearing the IDE cache via the menu File โ†’ Invalidate Caches / Restart helps.

Why do you need multiple versions of Build Tools?

Different projects may require different versions of build tools depending on the version of Gradle and the target version of Android. Having multiple versions allows you to simultaneously develop old and new applications without dependency conflicts.

How to remove unnecessary Android versions from the SDK?

Open SDK Manager, go to the SDK Platforms tab. Uncheck those versions of Android that you no longer need and click Apply. The manager will offer to delete the corresponding files, freeing up disk space.