gvcgo / gvc

Geek's valuable collection. A cross-platform supertool that brings convinience to coding.

Home Page:https://github.com/gvcgo/gvc/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

安装flutter后doctor不通过(似乎是环境变量的原因)

okatu-loli opened this issue · comments

commented

[!] Flutter (Channel stable, 3.10.6, on Microsoft Windows [版本 10.0.22621.2134], locale zh-CN)
! Warning: flutter on your path resolves to
C:\Users\qianshi.gvc\flutter_files\versions\3.10.6\flutter\bin\flutter, which is not inside your current Flutter
SDK checkout at C:\Users\qianshi.gvc\flutter_files\flutter. Consider adding
C:\Users\qianshi.gvc\flutter_files\flutter\bin to the front of your path.
! Warning: dart on your path resolves to C:\Users\qianshi.gvc\flutter_files\versions\3.10.6\flutter\bin\dart,
which is not inside your current Flutter SDK checkout at C:\Users\qianshi.gvc\flutter_files\flutter. Consider
adding C:\Users\qianshi.gvc\flutter_files\flutter\bin to the front of your path.
! Upstream repository https://github.com/flutter/flutter.git is not the same as FLUTTER_GIT_URL
image
image

一般是之前已经安装了flutter,没有清空原来的环境变量。

建议把之前安装的flutter和环境变量都清除干净。
然后用gvc安装flutter。

gvc默认的环境变量:
FLUTTER_GIT_URL=https://gitee.com/mirrors/Flutter.git
FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

主要是为了国内加速。如果使用github源,没有翻墙,极可能安装很慢或者安装不了。

flutter

如果单纯只是github.com检测超时,可以使用gvc的更新host的功能(gvc host),对github进行加速。doctor检测就能通过了。

这些环境变量都是设置好的国内加速,安装包啥的一般不会有问题。