Sdkmanager "Error: Could not find or load main class com.android.sdklib.tool.sdkmanager.SdkManagerCli" on Windows Sdkmanager "Error: Could not find or load main class com.android.sdklib.tool.sdkmanager.SdkManagerCli" on Windows flutter flutter

Sdkmanager "Error: Could not find or load main class com.android.sdklib.tool.sdkmanager.SdkManagerCli" on Windows


Open the sdkmanager.bat in a text editor and add echo %CLASSPATH% just below the CLASSPATH=%APP_HOME%\...\sdkmanager-classpath.jar. Then run sdkmanager --help which will echo the CLASSPATH of the required file. And check whether is it the valid path.

In my case, it was the wrong path,

enter image description here

It said my sdkmanger-classpath.jar is in lib folder. But it was not! It was actually inside the lib/_ folder. So as the simple solution what I did was copy the content in side lib/_ folder to lib. Then it worked fine!


  1. Download the SDK tools ZIP (Under Command Line Tools in https://developer.android.com/studio).
  2. Unzip using 7zip. Avoid using the default windows extractor - that doesn't do the extraction correctly.
  3. After unzipping using 7zip, place the contents into the sdk folder (C:\Users\<username>\AppData\Local\Android\Sdk\tools\bin and C:\Users\<username>\AppData\Local\Android\Sdk\lib) and run sdkmanager on command prompt.


On Windows Server 2019, using commandlinetools-win-6609375_latest.zip, we faced the same issue. We placed package inside Program File (i.e. C:\Program Files\Android\cmdline-tools\tools\bin).

It seems this will not work if there is space in the path. So we placed it in folder path without spaces (i.e. C:\Android\cmdline-tools\tools\bin) and it is working fine!🎉