安装flutter后doctor不通过(似乎是环境变量的原因)
okatu-loli opened this issue · comments
[!] 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
一般是之前已经安装了flutter,没有清空原来的环境变量。
建议把之前安装的flutter和环境变量都清除干净。
然后用gvc安装flutter。
gvc默认的环境变量:
FLUTTER_GIT_URL=https://gitee.com/mirrors/Flutter.git
FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
主要是为了国内加速。如果使用github源,没有翻墙,极可能安装很慢或者安装不了。