![How to fix Flutter upgrade issue on windows](https://irando.co.id/images/big/dBOBi9F3wz-1631338917.png)
If you're reading means you've at least once faced the issue with upgrading flutter SDK on windows OS, either you received this error (stuck)
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine f0826da7ef2d301eb8f4ead91aaf026aa2b52881...
Or This error after removing cache folder
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine ...
Either way to fix the issue go to C:\flutter\bin\internal
(Or any other path that your flutter sdk is there) and open this file update_dart_sdk.ps1
in your editor.
Find this line Import-Module BitsTransfer
And add following code below that.
If($httpProxy = ([System.Uri] $env:http_proxy)) {
$proxyUserInfo = $httpProxy.UserInfo.Split(":")
$proxyPass = ConvertTo-SecureString $proxyUserInfo[1] -AsPlainText -Force
$proxyCredential = New-Object System.Management.Automation.PSCredential ($proxyUserInfo[0], $proxyPass)
Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip -ProxyUsage Override -ProxyList ($httpProxy.Host + ":" + $httpProxy.Port) -ProxyCredential $proxyCredential -ProxyAuthentication Basic
} Else {
Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
}
Now you can run flutter upgrade
or flutter doctor
to see your upgrade progress starts.
- Last updated 3 years ago
Be the first to leave a comment.
You must login to leave a comment