Hey fellows in this post I will cover how to install and setup the android sdk command line tools in windows. In this post we will cover the following points
Let's get started
Step 1: Go to the Android Studio site
Step 2: Go to the Command line tools only section
Step 3: Click and download sdk command line tools for windows
Step 4: Accept the license and click Download Android Command Line Tools for windows button
Step 5: After accepting the license and clicking the Download Android Command Line Tools for windows button downloading will be start
Step 6: Extract the tar file to anywhere you like.
I will extract my tar file at F:\android
for easy reference where F:/ is drive name and android is the home directory of android
Step 7: Go inside cmdline-tools folder within android folder and create and folder with name latest.
Step 8: Move all files and folders inside the latest folder
Step 9: Open command prompt at the bin folder to access the sdkmanager.bat and get the required packages.The sdkmanager is a command line tool that allows you to view, install, update, and uninstall packages for the Android SDK.
Step 10: Now Select which android version and api you wish to download.I am going to download the latest version of android.
Step 11: Enter the sdkmanager.bat sdkmanager.bat "platforms;android-31" "build-tools;31.0.0" "platform-tools"
command in the command prompt to download the required packages.
Step 12: Downloading will be start after accepting the package license by typing y in the command prompt and hit enter key from keyboard.
Step 13: Downloading packages will be found under android.
Step 14: To Setup the path go to the environment variable from the pc properties.
Step 15: Create new variable ANDROID_HOME in the environment variable and link to the android folder in which we have all the packages.
Step 16: Go to the path property and add the adb path to the list.
Step 17: Close all the property windows by clicking OK button and open command prompt to check if everything is install correctly and type adb
it should return the results as shown below