在Flutter中文网中下载git、flutterSDK
在环境变量中配置git(X:\xxx\xxx\cmd)、flutter(X:\xxx\xxx\bin)地址
{
可以翻墙的不用下一步
用户环境变量中配置
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
}
完成以上步骤后重启电脑
重启电脑后开启 PowerShell窗口 运行 (flutter doctor)命令
运行命令后报错
Error: The Flutter directory is not acloneof the GitHub project. The flutter tool requires Gitinorder to operate properly; tosetup Flutter, run the followingcommand: git clone-b beta https://github.com/flutter/flutter.git
解决方案:在flutter SDK目录下重新git clone (https://github.com/flutter/flutter.git)
再次重启电脑后可以成功运行(flutter doctor)命令