Skip to main content
The SDK Manager in Android Code Studio allows you to download, install, update, and manage Android SDK components required for building Android applications.

Overview

The SDK Manager provides access to:
  • Android platform versions (API levels)
  • Android SDK Build Tools
  • Android SDK Platform Tools
  • System images for emulators
  • Additional libraries and components
SDK components are downloaded and installed within the app’s data directory, optimized for Android device constraints.

Accessing SDK Manager

You can access the SDK Manager through:
  1. Settings Menu - Navigate to Settings > SDK Manager
  2. Tools Menu - Select Tools > SDK Manager from the main menu
  3. Initial Setup - The SDK Manager runs automatically during first-time setup

SDK Components

Android Platforms

Android platform packages contain the Android framework APIs for specific API levels:
Android 14 (API 34)
Android 13 (API 33)
Android 12 (API 31/32)
Android 11 (API 30)
Android 10 (API 29)
Install the platform version that matches your app’s targetSdkVersion to ensure proper compilation.

Build Tools

Build Tools are required for compiling and building Android applications:
Build Tools Components
- aapt2 (Resource compiler)
- d8/r8 (Dex compiler/optimizer)
- zipalign (APK optimization)
- apksigner (APK signing)
Recommended versions:
  • Latest stable: 34.0.0
  • Minimum supported: 30.0.0

Platform Tools

Platform tools include ADB and other essential utilities:
Platform Tools
- adb (Android Debug Bridge)
- fastboot
- systrace

Installing SDK Components

1

Open SDK Manager

Navigate to Settings > SDK Manager or Tools > SDK Manager
2

Browse Available Packages

View available SDK platforms, build tools, and other components
3

Select Packages

Check the boxes next to the packages you want to install
4

Install

Tap “Install” or “Apply” to download and install selected packages
5

Wait for Download

Monitor the download and installation progress
SDK downloads can be large (100MB - 1GB+ per platform). Ensure you have sufficient storage space and a stable internet connection.

Managing Installed Packages

Viewing Installed Packages

Check which SDK components are currently installed:
  • View installed platforms and their API levels
  • Check build tools versions
  • Review available disk space

Updating Packages

Keep your SDK components up to date:
1

Check for Updates

Open SDK Manager to see if updates are available
2

Select Updates

Updates are typically marked with an “Update Available” indicator
3

Apply Updates

Install updates to get the latest tools and bug fixes

Uninstalling Packages

Remove unused SDK components to free up storage:
Do not uninstall SDK platforms or build tools that are required by your current projects.

SDK Locations

The Android SDK is installed in the app’s private directory:
SDK Directory Structure
$PREFIX/android-sdk/
├── platforms/
   ├── android-33/
   ├── android-34/
   └── ...
├── build-tools/
   ├── 33.0.2/
   ├── 34.0.0/
   └── ...
├── platform-tools/
└── tools/
The exact path depends on your installation. The IDE automatically configures SDK paths.

SDK Environment Variables

The IDE sets up the following environment variables:
Environment Setup
export ANDROID_HOME=$PREFIX/android-sdk
export ANDROID_SDK_ROOT=$PREFIX/android-sdk
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
export PATH=$PATH:$ANDROID_SDK_ROOT/build-tools/latest

Command Line Access

You can also manage SDK components using command-line tools in the terminal:
sdkmanager --list_installed

Troubleshooting

Download Failures

If SDK downloads fail:
1

Check Internet Connection

Ensure you have a stable internet connection
2

Check Storage Space

Verify sufficient free storage (at least 2-3GB recommended)
3

Retry Download

Try downloading again - downloads can resume if interrupted
4

Clear Cache

Clear the app cache if persistent issues occur

Missing SDK Components

If builds fail due to missing SDK components:
Error Messages
Failed to find Platform SDK with path: platforms/android-34
Failed to find Build Tools revision 34.0.0
Solution:
  1. Note the required component from the error message
  2. Open SDK Manager
  3. Install the missing component
  4. Rebuild your project

Corrupted Installation

If SDK installations are corrupted:
Back up your projects before reinstalling SDK components.
Terminal Cleanup
# Remove corrupted SDK directory
rm -rf $PREFIX/android-sdk

# Reinstall through SDK Manager
# Open SDK Manager and reinstall required components

Permission Errors

If you encounter permission errors:
Fix Permissions
# Ensure SDK directories have correct permissions
chmod -R 755 $PREFIX/android-sdk

Best Practices

Storage Management
  • Only install platforms you actively use
  • Remove old build tools versions
  • Keep at least 1-2GB free space for builds
Updates
  • Check for SDK updates monthly
  • Update build tools for latest optimizations
  • Read release notes before updating
Project Configuration
  • Match SDK version with targetSdkVersion
  • Use recent build tools for best performance
  • Document required SDK versions in project README
For most Android development projects:
Typical Requirements
android {
    compileSdk 34
    buildToolsVersion "34.0.0"
    
    defaultConfig {
        minSdk 24
        targetSdk 34
    }
}
Required SDK components:
  • Platform: Android 14 (API 34)
  • Build Tools: 34.0.0 or later
  • Platform Tools: Latest version
The SDK Manager intelligently suggests required components based on your project configuration.

Build docs developers (and LLMs) love