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:
Settings Menu - Navigate to Settings > SDK Manager
Tools Menu - Select Tools > SDK Manager from the main menu
Initial Setup - The SDK Manager runs automatically during first-time setup
SDK Components
Android platform packages contain the Android framework APIs for specific API levels:
Available Platforms
Platform Contents
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 are required for compiling and building Android applications:
- 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 include ADB and other essential utilities:
- adb (Android Debug Bridge )
- fastboot
- systrace
Installing SDK Components
Open SDK Manager
Navigate to Settings > SDK Manager or Tools > SDK Manager
Browse Available Packages
View available SDK platforms, build tools, and other components
Select Packages
Check the boxes next to the packages you want to install
Install
Tap “Install” or “Apply” to download and install selected packages
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:
Check for Updates
Open SDK Manager to see if updates are available
Select Updates
Updates are typically marked with an “Update Available” indicator
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:
$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:
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:
List Installed Packages
List Available Packages
Install Package
Update All Packages
sdkmanager --list_installed
Troubleshooting
Download Failures
If SDK downloads fail:
Check Internet Connection
Ensure you have a stable internet connection
Check Storage Space
Verify sufficient free storage (at least 2-3GB recommended)
Retry Download
Try downloading again - downloads can resume if interrupted
Clear Cache
Clear the app cache if persistent issues occur
Missing SDK Components
If builds fail due to missing SDK components:
Failed to find Platform SDK with path: platforms/android-34
Failed to find Build Tools revision 34.0.0
Solution:
Note the required component from the error message
Open SDK Manager
Install the missing component
Rebuild your project
Corrupted Installation
If SDK installations are corrupted:
Back up your projects before reinstalling SDK components.
# 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:
# 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
Recommended Setup
For most Android development projects:
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.