简体   繁体   English

如何修复“错误:Flutter 目录不是 GitHub 项目的克隆。” 尝试安装 flutter 时出错?

[英]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.

相关问题 尝试构建我的项目时,出现错误。 有人知道如何解决吗? - When trying to build my project I'm getting an error. Do anyone know how to fix it? flutter。 当我尝试运行此推荐“flutter build appbundle”时,出现此错误 - flutter . When I'm trying run this commend "flutter build appbundle" I get this error 如何在我运行 flutter 项目时修复“已完成错误:Gradle 任务 assembleDebug 失败,退出代码 -1”错误 - How to fix “Finished with error: Gradle task assembleDebug failed with exit code -1” error when i run flutter project 当我尝试更改 flutter 项目中的应用程序图标时,此错误是什么 - What is this error when I trying to change app icon in a flutter project 我正在尝试将 firebase 添加到我的 flutter 项目中,但我不断收到此错误找不到方法实现() - I'm trying to add firebase to my flutter project but i keep on getting this Error Could not find method implementation() Flutter:我正在使用 flutter 应用程序,我从 git 集线器克隆它,当我尝试运行它时构建失败 - Flutter: I'm working in a flutter application which i clone it from git hub, the build is failed when i trying to run it 当我从 github 克隆现有的 android 项目时,会显示此错误。 任何人都可以修复它吗? 请帮我 - When I clone existing android project from github and this error is shown. Could anyone fix it? please help me 尝试使用 flutter_screenutil package 和 Introduction_screen package 时,我在 flutter 中遇到延迟初始化错误 - I'm getting late initialization error in flutter when trying to use flutter_screenutil package with introduction_screen package Flutter:当我尝试运行从 github 克隆的 flutter 应用程序时,但构建失败,有人可以告诉我如何解决吗? - Flutter : when i try to run flutter app that i clone from github, but the build failed, could someone inform me how to solve it? 如何修复此错误,当我尝试从 react-native 项目构建.apk 时发生 - how to fix this error, its happen whene i'm trying to build .apk from react-native project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM