【flutter doctor HTTP host常见报错】HTTP Host availability check is taking a long time...

Problem description one:

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: The semaphore timeout has expired
insert image description here

solution:

1. Find the file directory of flutter sdk, and then find the flutter/packages/flutter_tools/lib/src/http_host_validator.dart file
2. Change https://maven.google.com/ to https://dl.google.com/ dl/android/maven2/
insert image description here
3. Close all programs that have opened the flutterSDK, find the flutter_tools.snapshot file in the flutter\bin directory, and delete it permanently.
insert image description here

4. Win+R runs the cmd command window to execute flutter doctor, and the problem is solved.

Problem description two:

HTTP host "https://pub.dev/" is not reachable. 

solution:

Configure the domestic pub plug-in mirror address, the parameters are as follows

PUB_HOSTED_URL
https://pub.flutter-io.cn

FLUTTER_STORAGE_BASE_URL
https://storage.flutter-io.cn

The author configures the mirror of the Flutter community. For more mirrors, refer to the Flutter Chinese website
insert image description here

insert image description here

Problem description three:

HTTP host "https://cloud.google.com/" is not reachable. 

solution:

Not resolved yet! ! !

Guess you like

Origin blog.csdn.net/qq_41602125/article/details/127407360