[英]How do I fix the "Error: The Flutter directory is not a clone of the GitHub project." error when I'm trying to install flutter?
I downloaded and installed git 2.18 easily and then I proceeded o download the zip SDK of flutter.我轻松下载并安装了 git 2.18,然后继续下载 zip SDK 的 Z5ACEBC7AAB70DDBBAE074B0AC. Once I did that, I extracted it to my documents folder and then I updated the path in the "environmental variables" tab in the control panel: The Path一旦我这样做了,我将它解压缩到我的文档文件夹,然后我在控制面板的“环境变量”选项卡中更新了路径:路径
After this, I proceeded to make sure everything was working by typing in flutter into the control panel, and afterward, I got this error: The error .在此之后,我继续通过在控制面板中输入 flutter 来确保一切正常,然后,我收到了这个错误:错误。 I tried fixing it by typing in the command that the error told me to enter, and afterward, I still got the error.我尝试通过输入错误告诉我输入的命令来修复它,然后我仍然收到错误。 Could someone please tell me how to fix this and also how to fix the mistake of typing in and entering the command from the error?有人可以告诉我如何解决这个问题,以及如何解决从错误中输入和输入命令的错误吗?
Make sure that git
is in your path by calling it.通过调用它来确保git
在您的路径中。 If it is not, add it to your path.如果不是,请将其添加到您的路径中。
If this still won't work go to your flutter directory, delete it and rerun the git clone
of the flutter repo.如果这仍然不起作用 go 到您的 flutter 目录,请将其删除并重新运行 Z5ACEBC4CB70DDBB074B0AC76ZA 的git clone
。
If you are on mac sometimes you won't see hidden files in Finder app, which results in missing hidden files and folders like.git, .gitignore,.idea etc while copying to your flutter directory.如果您在 Mac 上,有时您不会在 Finder 应用程序中看到隐藏文件,这会导致在复制到 flutter 目录时丢失隐藏文件和文件夹,例如.git、.gitignore、.idea 等。 This causes similar error because of incomplete files由于文件不完整,这会导致类似的错误
Press 'Shift' + 'cmd' + '.'按“Shift”+“cmd”+“。” buttons together to view hidden files and copy all files to flutter directory按钮一起查看隐藏文件并将所有文件复制到 flutter 目录
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.