系统:windows 10
安装 :git 网址https://git-scm.com/download/win
在文件夹 shift 右击 ,选择进入powshell窗口,输入:
flutter doctor
如果提示不正确,安装flutter
git clone -b stable https://github.com/flutter/flutter.git
如果,报错,输入:git config --global http.postBuffer 524288000
指定镜像 mac 使用export, windows系统使用set
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
安装中问题尝试
一,加大缓存区
git config –global http.Buffer 524288000
这个大约是500M
二、少clone一些,–depth 1
git clone https://github.com/flutter/flutter.git –depth 1
–depth 1的含义是复制深度为1,就是每个文件只取最近一次提交,不是整个历史版本。
三、换协议
clone http方式换成SSH的方式,即 https:// 改为 git://
例如git clone https://github.com/flutter/flutter.git
换成git clone git://github.com/flutter/flutter.git
以上都没有成功,换个网址接着试试:
下载fultter的SDK压缩包,格式zip,链接https://storage.googleapis.com/flutter_infra/releases/stable/windows/flutter_windows_1.20.3-stable.zip
一键解压,打开flutter_console.bat,运行,输入命令:
flutter doctor
出现如图所示:

好像是成功了,这期间各种尝试,包含配置环境变量:
系统path,如图

镜像,如图:


网友评论