Reputation: 503
When I run flutter change channel
or flutter doctor
, the CMD show me this:
C:\Users\MyUser>flutter doctor -v
Checking Dart SDK version...
Building flutter tool...
Running pub upgrade...
/C:/src/flutter/packages/flutter_tools/lib/src/aot.dart:144:5: Warning: Must explicitly return a value from a non-void function.
return;
^
When I run:
git clean -xfd
git pull
flutter doctor
The CDM show me this:
fatal: not a git repository (or any of the parent directories): .git
How can I solve it? Thank you
Upvotes: 1
Views: 6444
Reputation: 1
unfortunately none of the given solution so far works for me..
I had to the following steps, which was the only solution for me:
Upvotes: 0
Reputation: 1
On windows, delete flutter folder C:\Users\User\AppData\Local\Pub This is the flutter temp/cache folder and may contain outdated versions of the libraries
Upvotes: 0
Reputation: 1
I had the exact same problem yesterday, i tired to run
git clean -xfd
git pull
flutter doctor
in cmd and i kept getting:
fatal: not a git repository (or any of the parent directories): .git
eventually i gave up and i deleted the old flutter sdk directory from my PC as well as the path from Enviroment Variables and i downloded the new sdk and setup flutter again and now it's running fine
https://docs.flutter.dev/get-started/install
Upvotes: 0
Reputation: 147
1.Go the Flutter install directory and please run (in cmd)
git clean -xfd
git stash save --keep-index
git stash drop
git pull
2.and restart your computer then run
flutter doctor
3.then go to your project path run
flutter packages get
flutter run
Upvotes: 3
Reputation: 56
Had the same issue...Copied the flutter_tools from flutter download and replaced with the same folder in my installation then ran flutter doctor from command in administrator mode. Funny the issue started 3 days ago for me too.
Upvotes: 3