- Java Development Kit
- OS that compatible for Android SDK [Windows/macOS/Linux] (In my case, I use Windows 11)
- Check the system requirements for the specific version of the Android SDK you want to install. (Different versions of the SDK may have varying hardware and software requirements)
- Visit the Android Developer website here and navigate to the "Command line tools only" section.
- Download the appropriate "Command line tools only" package for your operating system.
- Extract the downloaded package to a directory of your choice. (In my case, I extract the folder to
C:\android-sdk
) - Go to the
cmdline-tools
folder. Make a new folder namelatest
and move all contents tolatest
folder.
-
Configure Environment Variables:
- Open the System Properties on your computer.
- Create a new environment variable called
$ANDROID_HOME
and set its value to the directory where you extracted the Android SDK.
-
Add the Android SDK Tools to the Path:
- When back to the Environment Variables window, locate the "Path" variable.
- Click on "Edit" and add the "New" following paths:
%ANDROID_HOME%\cmdline-tools\latest\bin
%ANDROID_HOME%\emulator
%ANDROID_HOME%\platform-tools
-
Verify the installation by opening a command prompt or terminal and running the following command:
sdkmanager --version
-
Install desired SDK components:
- Run the following command to list available SDK packages:
sdkmanager --list
- Identify the package names of the SDK components you want to install (e.g., platform-tools, build-tools, specific platform versions, etc.).
- Run the following command to install the desired SDK components:
sdkmanager "package1" "package2" ...
Replace "package1", "package2", etc., with the actual package names you want to install.
- Run the following command to list available SDK packages: