The Android SDK (Software Development Kit) is a large and powerful tool that’s essential if you’re looking to get into Android app development. It serves a number of other purposes, too, such as using the command line to sideload apps onto your Android phone.
There are quite a few details and things to consider when installing the Android SDK on your Windows PC. The following guide should help you wade through the process.
Install the Latest Version of Java
If you don’t want to use Android Studio and just want the Android SDK command line version, then you’ll need to first download and install Java.
- On the official Java Downloads page, scroll down and click on the “Windows” tab.
- The available downloads will now come into view. Select and download the “x64 MSI Installer.”
- Go ahead and install the latest Java version on your PC. You’ll be able to find it in C:\Program Files\Java\jdk-220.127.116.11 (or whatever version number you’ve installed – 18.104.22.168 being the number version).
Install SDK Command Line
Android Studio is a space-consuming app, and while we think its UI (user interface) makes it a very accessible way of managing your development tools and packages, some people prefer the command-line route.
- On the Android Studio download page, pick the Windows option under “Command line tools only.”
- The SDK tool package will download to your PC as a .zip file. Extract the zip file. You should see a “cmdline-tools” within the extracted folder.
- In your C: drive, create a new “Android” folder.
- Within the Android folder, create a new folder “cmdline-tools”. And within this “cmdline-tools” folder, create a “tools” folder.
- Lastly, move the content of the extracted file to the “Tools” folder.
Getting Started With SDK Command Line
- Run Command Prompt as Administrator.
cdto the “bin” folder:
- Type the following command, which will show you a list of installed, valid packages, as well as those that can be updated.
- To install the platform tools, type the command:
sdkmanager "platform-tools" "platforms;android-33"
After the installation, you should find new “platform-tools” folder in the “Android” folder. Within this folder contains the adb.exe, fastboot.exe and several other executables.
This will give you access to the
fastboot commands, which are great if you enjoy sideloading things onto Android and dabbling in the recovery options.
Install Android Studio
Alternatively, if you want to enjoy all the modern features, conveniences and UI elements of Android Studio, then it’s pretty simple.
- On the Android Studio download page, select “Download Android Studio,” and follow the instructions. During installation, however, there are a couple of things to consider.
- The installer will offer to install an extra feature called Android Virtual Device, which creates an emulated environment to test various features and apps. Confirm whether you want to install this feature. (You’ll be asked again later whether you want to install this, so it doesn’t matter if you skip it here.)
- Once you do this and select an install directory, Android Studio will begin installing. It’s a big program so may take a while, depending on your hardware.
- Once Android Studio is installed, open it. It will ask whether you want to import your existing Android Studio settings.
- After that, click “Next” to follow the wizard, then “Custom” to install custom components (if you want that).
- In case you need Java with your Android Studio projects, go to your Java directory when prompted. In our case, it’s “C:\Program Files\Java\jdk-22.214.171.124”.
- Select your theme, then pick any extra components you want to install. We recommend checking the “Performance” box to improve Android emulation based on your processor, and you can again pick Android Virtual Device if you think you’ll be using it.
- Keep clicking “Next,” then “Finish” when you’re done.
- Once Android Studio is fully installed, open it and you’re away.
- Click “Create New Project,” and feast your eyes on the great selection of templates.
- Or click on “More Actions” of the main Android Studio screen.
- This will open a drop-down menu with options like SDK Manager and Virtual Device Manager. Below, you can take a look at SDK Manager.
Frequently Asked Questions
How can I check my current Java version?
You might not need to install the latest Java version on your PC prior to installing your command line tools. Checking your Java version is easy, just type the following command into Command Prompt:
java -version. Cmd will immediately display the version you’re running.
I'm getting an "sdkmanager is not recognized as an internal or external command, operable program or batch file" error. How can I fix it?
You need to revisit the part of the tutorial where you set up environmental variables. Make sure you follow the steps of where to unzip the command-line tool. It’s important. Double check if you copied the correct path from the source folder and if you’ve pasted it in the right place.
My Android Studio download got stuck. What can I do?
If you’re experiencing your download freezing, it could be due to high CPU usage or internet issues, which might have caused the download to get interrupted. To counter the latter, we recommend closing all the programs/apps that are running at that point to prevent the internet being consumed by other processes. In the case of high CPU usage, here’s a list of fixes to help you deal with this problem.
Image credit: Zain Ali via Pexels
Our latest tutorials delivered straight to your inbox