当前位置:   article > 正文

记Flutter 安装报错:Error: The Flutter directory is not a clone of the GitHub project flutter

记Flutter 安装报错:Error: The Flutter directory is not a clone of the GitHub project flutter

Flutter 安装报错:Error: The Flutter directory is not a clone of the GitHub project flutter

1.我是直接从官网下载最新版本 stable 的 Flutter SDK ,解压后存放在c:/src 下,
然后执行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 beta https://github.com/flutter/flutter.git

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

2.是由于未检测到.git文件引起,然后于是在c:/src/flutter 目录下执行 git init 提示如下:


Reinitialized existing Git repository in C:/src/flutter/.git/

  • 1
  • 2
  • 3

3.这说明目录下已经存在了.git文件,原来是系统默认隐藏了,然后点击查看->勾选隐藏,.git文件就可以查看了

在这里插入图片描述
4.接下来我们重新执行 flutter doctor,就可以正常运行了,静静的等待就ok.

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/320189
推荐阅读
相关标签
  

闽ICP备14008679号