简体   繁体   中英

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. 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 . 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. 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.

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. This causes similar error because of incomplete files

Press 'Shift' + 'cmd' + '.' buttons together to view hidden files and copy all files to flutter directory

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM