简体   繁体   中英

'flutter doctor' command on cmd not working

any flutter command I tried running it's showing

Checking Dart SDK version...
Downloading Dart SDK from Flutter engine af51afceb8886cc11e25047523c4e0c7e1f5d408...
Downloading the Dart SDK using the BITS service failed, retrying with WebRequest...
Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send.
At C:\src\flutter\flutter\bin\internal\update_dart_sdk.ps1:68 char:5
+     Invoke-WebRequest -Uri $dartSdkUrl -OutFile $dartSdkZip
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Error: Unable to update Dart SDK. Retrying...

Waiting for 1 seconds, press CTRL+C to quit ...
Terminate batch job (Y/N)?

I have been learning flutter for 3 months now and it worked fine. Any Suggestion how to fix this problem

Looks to be a known issue. Could you check the link? https://github.com/flutter/flutter/issues/27276

I hade the same problem. I download the flutter SDK. if you don't see the "flutter_windows_v1.12.13+hotfix.9-stable.zip" button then you need to use free VPN extension. After enabling VPN then you might see this "flutter_windows_v1.12.13+hotfix.9-stable.zip" button. download and extract the flutter SDK. setup env variable.

that's how I solved the problem, hope this will work for you.

Start your VPN and reset console maybe can not access to URI from your country IP , My problem was solved with this solution

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM