问题描述
我已经从 https://flutter.io/setup-windows下载了 Flutter /(flutter_windows_v0.5.1-beta.zip)在Windows 10中并遵循指南,将zip提取到 C:\ Users \ M中. Junaid ,然后打开flutter-console.bat.我试着去扑医生,但得到了以下信息
I had downloaded Flutter from https://flutter.io/setup-windows/ (flutter_windows_v0.5.1-beta.zip)in windows 10 and followed the guidelines, extracted the zip in C:\Users\M. Junaid and opened flutter-console.bat. I tried to run flutter doctor but got the following
Error: The Flutter directory is not a clone of the GitHub project.
The flutter tool requires Git in order to operate properly;
The to set up flutter, run the following command:
git clone -b beta https://github.com/flutter/flutter.git
重新检查已正确安装的依赖项Git和PowerShell,并且路径变量也正确-C:\ Users \ M.Junaid \ flutter \ bin
我尝试了这些但没有成功:
I Tried These But Nothing Worked:
- 试图在AppData等不同位置提取C:\ flutter.
- 以管理员身份运行flutter_console.bat.
- cd抖动,然后运行命令
推荐答案
Flutter检查git文件夹,该文件夹通常是隐藏文件夹.如果您复制并粘贴了zip文件的内容,则很有可能会错过复制此隐藏文件夹的机会.
Flutter checks for a git folder, which is normally a hidden folder. If you copied and pasted the contents of the zip file, there is a good chance that you missed copying this hidden folder.
您可以通过执行以下任一操作来解决此问题:
You can solve this by doing one of the following:
- 直接将文件夹解压缩到需要Flutter的位置,或者
- 复制外部文件夹(
flutter
)以在其中包含所有隐藏文件,或者 - 显示所有隐藏文件,然后选择并复制.
- Unzip the folder directly to where you want Flutter, or
- Copy the outer folder (
flutter
) to include all the hidden files inside, or - Show all hidden files before selecting them and copying.
这篇关于Flutter目录不是GitHub项目的克隆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!