Jump to content
Guest

How to update your Android SDK by command-line

Recommended Posts

Guest

How to update your Android SDK?

  • using Android Studio by Google (GUI),  on setings options.
  • by command-line on Android SDK folder using SDKManager.bat

 

  1. open your CMD and go to Android SDK folder...   ...\cmdline-tools\bin   <--- here is it SDKManager.bat
  2. for easy use, you can set the environment variable used for SDKManager sub-commands-tools
    1. SET ANDROID_SDK_ROOT=D:\SDK25-ROOT-FOLDER   > Ex.: c:\MySdks\Android\SDK2525  (folder where start the directory for your SDK subfolders/files)  <-- pay attention, not   ..\cmdline-tools\bin  NO! NO! NO!
    2. other way, you can indicate this folder-root on command-line, like:
      1. sdkmanager.bat  --sdk_root=D:\SDKs\SDK25   ....other-params
  3. Ex. to download/uninstall/update the last pacakges:
    1. sdkmanager.bat  --sdk_root=D:\MySDKs\SDK25  --List   (list all packages on Google for download -- all package names will be showed)
    2. sdkmanager.bat  --sdk_root=D:\MySDKs\SDK25  --List_Installed   (list all packages alread installed in your disk)
    3. sdkmanager.bat  --sdk_root=D:\MySDKs\SDK25  --Update   (update all packages already installed in your disk)
    4. sdkmanager.bat  --sdk_root=D:\MySDKs\SDK25  --Uninstall  "package-name" "..." "..." ....  (uninstall just these package installed in your disk)
    5. sdkmanager.bat  --sdk_root=D:\MySDKs\SDK25  "package-name" "..." "..." ....  (install just these package)
    6. sdkmanager.bat  --sdk_root=D:\MySDKs\SDK25  "platform-tools" "platforms;android-30" "cmdline-tools;latest" "emulator"  (install this 4 packages in your disk)
  4. remembering: 
    1. the Android SDK files it's not really installed in your MSWindows, and yes, just copied for your disk.
    2. that way, you can move the original folders from Embarcadero installation for any disk or folder.
    3. by default, Embarcadero copy the files to C:\Public\....\CatalogueRepository.... SDKxxxVersion ...., you can just move (copy/paste)  this file for another path more "short" if you want! none problem!
      1.  Later, just readjust the path on IDE using Tools->SDK Manager options.
Edited by Guest

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×