升级到Flutter 3.0时遇到问题。当我进行升级时,大多数进程都运行正常,但升级dart sdk时总是出现错误。下面是我看到的:
Downloading Darwin arm64 Dart SDK from Flutter engine caaafc5604ee9172293eb84a381be6aadd660317...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:29 --:--:-- 0curl: (6) Could not resolve host: storage.googleapis.com
Warning: Problem : timeout. Will retry in 1 seconds. 3 retries left.
0 0 0 0 0 0 0 0 --:--:-- 0:00:29 --:--:-- 0curl: (6) Could not resolve host: storage.googleapis.com
Warning: Problem : timeout. Will retry in 2 seconds. 2 retries left.
0 0 0 0 0 0 0 0 --:--:-- 0:00:29 --:--:-- 0curl: (6) Could not resolve host: storage.googleapis.com
Warning: Problem : timeout. Will retry in 4 seconds. 1 retries left.
0 0 0 0 0 0 0 0 --:--:-- 0:00:29 --:--:-- 0curl: (6) Could not resolve host: storage.googleapis.com
/Users/jai/Dev/Flutter/bin/internal/update_dart_sdk.sh: line 156: return: can only `return' from a function or sourced script
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:07 --:--:-- 0
curl: (7) Failed to connect to storage.googleapis.com port 443 after 7330 ms: Bad file descriptor
Failed to retrieve the Dart SDK from: https://storage.googleapis.com/flutter_infra_release/flutter/caaafc5604ee9172293eb84a381be6aadd660317/dart-sdk-darwin-arm64.zip
If you're located in China, please see this page:
https://flutter.dev/community/china
注意事项:
- 当我尝试自己升级dart时,我看到了相同的结果。
- 事实上,我不在中国(我在美国)
任何想法吗?
我发现了问题-我被我最近添加的防火墙工具无声地阻止(当某些东西试图建立外部连接而不是阻止它时应该报告)。
新防火墙是Lulu吗?我有点断章取义了,但这是我的两点看法:既然你是在MacOS上,我建议通过自制来管理flutter(和你的其他软件)。如果你已经在使用自制软件,我的解决方案是brew reinstall flutter
。这样你就会100%知道有一个连接问题,这不是一个特定的Flutter SDK问题!此外,自制将能够升级您的扑动版本(或任何其他程序)自动!:)包管理器!
p。S brew将自动为您更新ENV变量(在大多数情况下)