HTTP Host Availability
错误提示如下,分析可知是 maven.google.com 访问失败造成的:
HTTP host https://maven.google.com/ is not reachable. Reason: An error occurred while checking the HTTP host: Operation timed out
解决步骤:
- 打开
/path-to-flutter-sdk/packages/flutter_tools/lib/src/http_host_validator.dart
文件,修改https://maven.google.com/
为 google maven 的国内镜像,如https://maven.aliyun.com/repository/google/
- 删除
/path-to-flutter-sdk/bin/cache
文件夹 - 重新执行
flutter doctor
网友评论