sdkmanager
Install and manage Android SDK packages
TLDR
SYNOPSIS
sdkmanager [--list|--listinstalled|--update|--licenses|--uninstall] [options] [packages..._]
DESCRIPTION
sdkmanager manages Android SDK components from the command line, installing, updating, and removing platform packages, build tools, system images, and other SDK components. It is the headless counterpart to Android Studio's SDK Manager and is provided in the Android SDK Command-Line Tools package.Packages are identified by string paths like platforms;android-35 for platform APIs, build-tools;35.0.0 for compilation tools, and system-images;android-35;google_apis;x86_64 for emulator images. Multiple packages can be installed in a single command by separating them with spaces, each wrapped in quotes.License acceptance is required before installing packages. Running --licenses interactively accepts all pending licenses, which is essential for automated CI/CD setups where the SDK needs to be provisioned non-interactively.
PARAMETERS
--list
List all available and installed packages.--list_installed
List only installed packages.--update
Update all installed packages to the latest versions.--uninstall PACKAGES
Remove specified packages.--licenses
Review and accept SDK licenses. Required before installing packages.--sdk_root PATH
Specify the SDK installation directory (overrides ANDROID_HOME).--channel N
Include packages from the specified channel: 0 (stable, default), 1 (beta), 2 (dev), 3 (canary).--no_https
Use HTTP instead of HTTPS for downloads.--verbose
Enable verbose output showing errors, warnings, and all messages.--proxy TYPE
Connect via a proxy of the given type (http or socks).--proxy_host HOST
IP or DNS address of the proxy.--proxy_port PORT
Proxy port number.
CONFIGURATION
ANDROID_HOME
Environment variable specifying the root directory of the Android SDK installation.ANDROID_SDK_ROOT
Alternative to ANDROIDHOME for specifying the SDK location (deprecated in favor of ANDROIDHOME).
CAVEATS
Part of Android SDK Command-Line Tools, which must be downloaded separately. Requires ANDROIDHOME or --sdkroot to be set. Package downloads can be large. If Android Studio is installed, the IDE's built-in SDK Manager can be used instead.
SEE ALSO
adb(1), avdmanager(1), emulator(1), gradle(1)
