本文主要是介绍【flutter doctor HTTP host常见报错】HTTP Host availability check is taking a long time...,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
问题描述一:
HTTP Host availability check is taking a long time…[!] HTTP Host Availability
HTTP host “https://maven.google.com/” is not reachable.
Reason: An error occurred while checking the HTTP host: 信号灯超时时间已到
解决方案:
1、找到flutter sdk的文件目录,依次找到flutter/packages/flutter_tools/lib/src/http_host_validator.dart文件
2、将https://maven.google.com/ 修改为https://dl.google.com/dl/android/maven2/
3、关闭所有打开了flutterSDK的程序,找到flutter\bin目录下的flutter_tools.snapshot文件,永久删除。
4、Win+R运行cmd命令窗口执行 flutter doctor 问题解决。
问题描述二:
HTTP host "https://pub.dev/" is not reachable.
解决方案:
配置国内的pub插件镜像地址,参数如下
PUB_HOSTED_URL
https://pub.flutter-io.cnFLUTTER_STORAGE_BASE_URL
https://storage.flutter-io.cn
笔者配置的是Flutter社区的镜像,更多镜像参考Flutter中文网
问题描述三:
HTTP host "https://cloud.google.com/" is not reachable.
解决方案:
暂时未解决!!!
这篇关于【flutter doctor HTTP host常见报错】HTTP Host availability check is taking a long time...的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!