1.配置环境变量
设置用户环境变量:
PUB_HOSTED_URL=https://pub.flutter-io.cn
FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
设置用户的path: D:\flutter\install\flutter\bin;C:\Program Files\Git\bin
2.运行flutter doctor
报错:
Error: The Flutter directory is not a clone of the GitHub project.
The flutter tool requires Git in order to operate properly;
to set up Flutter, run the following command:
git clone -b stable https://github.com/flutter/flutter.git
解决方法:将flutter下载下来的目录用git的方式拉取,git clone https://github.com/flutter/flutter.git
然后再运行还是报错
无法将“Unblock-File”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查
名称的拼写,如果包括路径,请确保路径正确,然后重试。
所在位置 行:1 字符: 13
+ Unblock-File <<<< -Path 'D:\flutter\instal