国内配置:

  1. export PUB_HOSTED_URL=https://pub.flutter-io.cn
  2. export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

如果提示”https://maven.google.com/ “无法访问:

  1. Step1 flutter\packages\flutter_tools\lib\src\http_host_validator.dart
  2. https://maven.google.com/ 修改为:
  3. https://dl.google.com/dl/android/maven2/
  4. Step2 删除“flutter\bin\cache”文件夹
  5. Step3 再次运行flutter doctor

chrome配置:

  1. export CHROME_EXECUTABLE=/snap/bin/chromium