[英]Got socket error trying to find package cupertino_icons at https://pub.dartlang.org
Whenever i try to create a new project in flutter through git bash or command prompt, i keep on getting this error Got socket error trying to find package cupertino_icons at https://pub.dartlang.org.
每当我尝试在 flutter 至 git bash 或命令提示符中创建新项目时,我都会收到此错误
Got socket error trying to find package cupertino_icons at https://pub.dartlang.org.
I have upgraded the flutter sdk to the latest version but still the same problem.我已经把flutter sdk升级到最新版本了,还是一样的问题。 Please how do i solve this issue.
请问我该如何解决这个问题。 Thanks
谢谢
I would advice anyone that might still be having this problem to TRY the following simply steps:我建议任何可能仍然遇到此问题的人尝试以下简单步骤:
This did it for me.这为我做到了。 After spending weeks tryna figure it out.
花了几个星期后试着弄清楚。 Would love to save someone the headache i went through.
很想拯救某人我经历的头痛。
I have both issues.我有两个问题。 With:
和:
自己花了2个小时,除了之前的设置,检查你的杀毒软件,我的自动阻止了flutter,所以完全禁用你的杀毒软件然后再次尝试运行,希望这对某人有所帮助。
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
name: PUB_HOSTED_URL
value: https://pub.flutter-io.cn
name: FLUTTER_STORAGE_BASE_URL
value: https://storage.flutter-io.cn
I have found that resetting your wifi router works.我发现重置您的 wifi 路由器有效。 It's happened to me twice and it worked after I reset my router.
它发生在我身上两次,并且在我重置路由器后它起作用了。
Using a VPN for access to the inte.net did the trick for me.使用 VPN 访问 inte.net 对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.