nativescript-cli icon indicating copy to clipboard operation
nativescript-cli copied to clipboard

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

Open atheistrepublic opened this issue 6 years ago • 6 comments

Hi i am trying to install flutter and getting an error when i type sdkmanager --list in the command prompt .I have added the environment variables correctly.I am attaching the screenshots that shows this problem and also the environment variables i am using and my directory structure.I am trying to install command line tools only and not android studio.How can i solve this error?

Screenshot (5251) Screenshot (5252) Screenshot (5253) Screenshot (5254)

atheistrepublic avatar May 01 '20 08:05 atheistrepublic

I think latest version '6200805' has some issue, even I got the same problem.

Solution: Use the older sdkmanager version, please find below links for older version.

Windows no installer: https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip

MacOSX: https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip

Linux: https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip

krayanni avatar May 04 '20 02:05 krayanni

Interestingly enough, downloading the older version from @krayanni 's link didn't work for me at first. However, when I used 7zip instead of the default windows unzip tool, it worked for me. After unzipping, I ran sdkmanager --android-licenses in terminal and replied y to confirm every update.

shadrachdev avatar Jun 07 '20 03:06 shadrachdev

@shad-1 is right using 7zip to extract worked great. Windows zip manager must have an issue when extracting the files

Asandax6 avatar Jun 12 '20 02:06 Asandax6

Interestingly enough, downloading the older version from @krayanni 's link didn't work for me at first. However, when I used 7zip instead of the default windows unzip tool, it worked for me. After unzipping, I ran sdkmanager --android-licenses in terminal and replied y to confirm every update.

This worked for me as well, I used the latest version though.

JetErorr avatar Jun 20 '20 10:06 JetErorr

Yes Use 7zip for the win!

SaiCodeWorld avatar Jul 19 '20 19:07 SaiCodeWorld

Here's the link to the corresponding issue on the Android issue tracker: https://issuetracker.google.com/issues/154298380

andreban avatar Jul 24 '20 18:07 andreban