最近安装了 Flutter 并探索了 hello-world 应用程序。遵循https://flutter.io/get-started/中提到的所有步骤并能够运行
:: 颤振医生
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.15063], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.2)
[√] Android Studio (version 3.1)
[!] VS Code, 64-bit edition (version 1.26.0)
[√] Connected devices (1 available)
! Doctor found issues in 1 categories.
还能够使用以下命令创建应用程序骨架;
::颤振创建myapp
但是当它尝试安装 pubspec.yaml 下提到的所有依赖项时,它开始显示错误并不断尝试重新连接。这是日志,
Running "flutter packages get" in hello_world...
Got TLS error trying to find package cupertino_icons at https://pub.dartlang.org.
pub get failed (69) -- attempting retry 1 in 1 second...
Got TLS error trying to find package cupertino_icons at https://pub.dartlang.org.
pub get failed (69) -- attempting retry 2 in 2 seconds...
我怀疑这是因为防火墙和其他包管理器,我一直在使用代理服务器来启用 fetch,它工作得很好。我找不到为颤振或 pub 实现这种代理的方法。我也尝试使用中国服务器,但这也没有帮助我。我已经安装和卸载了几次以确保缓存不会导致此问题。
有没有人想通了呢?