sdkmanager Warning: Failed to download any source lists

7.4k Views Asked by At

Ive been working on this problem for like hours and tried everything, but I cant get past this roadblock.

I intend to create an APK using Apache Cordova, while trying to execute sdkmanager --list

I get this output:

C:\Windows\system32>sdkmanager --list
Warning: Failed to download any source lists!
Warning: IO exception while downloading manifest
Warning: IO exception while downloading manifest
Warning: Still waiting for package manifests to be fetched remotely.
[=======================================] 100% Computing updates...

and for getting build tools:

C:\Windows\system32>sdkmanager "build-tools;29.0.0"
Warning: Failed to download any source lists!
Warning: IO exception while downloading manifest
Warning: IO exception while downloading manifest
Warning: Still waiting for package manifests to be fetched remotely.
Warning: Failed to find package 'build-tools;29.0.0'
[===                                    ] 10% Computing updates...
C:\Windows\system32>

Things I've tried:

  1. Disable firewall and/or antivirus
  2. Running cmd and PowerShell as administrator
  3. Restarting my system and deleting caches
  4. Ran some proxy server command too but it didn't work
  5. Removing .android file from appdata (wasn't there anyway)
C:\Windows\system32>sdkmanager --version
5.0

Environment Variables are working fine, and no Android Studio was previously installed.

Thanks in advance

3

There are 3 best solutions below

0
Pratik Agarwal On BEST ANSWER

Solved it. There were 2 problems:

  1. Reinstalling Java from java.com/en/download Give correct path of JAVA_HOME and JAVA_EXE
  2. setting the correct directories of the sdkmanager.bat

The default one is messed up... Keep it exactly like this: C:\Android\sdk\cmdline-tools\5

folder name 5 is the version name. Not necessarily need to be correct if you want to find the version, open the NOTICE.txt you get from commandline-tools

It ran fine without any admin rights or firewall disabling

2
fluxrider On

For me, running sdkmanager.bat --verbose, I could see the problem was with ssl. So running sdkmanager.bat --no_https did the trick.

0
FarHooD On

I have Intellij and After some year need android sdk to create android app , As like you have same problem and I found a way In here : Failed to download any source list - android SDK

Just set Android_sdk_home to root of sdk downloaded (folder that contain Bin and Lib) after that start command from bin folder like :.\sdkmanager.bat --no_https --update and works! And if you work with proxy like me : do it like : .\sdkmanager.bat --list --proxy=http --proxy_host=127.0.0.1 --proxy_port=58591

58591 its my proxy port