出现镜像错误等现象属于源码包不全面,国内下载镜像添加环境变量。
①:Linux执行如下操作
export PUB_HOSTED_URL=https://pub.flutter-io.cn export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn git clone -b dev https://github.com/flutter/flutter.git export PATH="$PWD/flutter/bin:$PATH" cd ./flutter flutter doctor
②:Windows执行如下操作
添加环境变量
PUB_HOSTED_URL https://pub.flutter-io.cn
FLUTTER_STORAGE_BASE_URL https://storage.flutter-io.cn
在原来不完整的包下执行flutter doctor