-1

When I try to run any Flutter Command, it gives me this error:

The system could not find the path specified
Error (1): Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)

After that, it waits 5 Seconds and loops. To end the loop it tells me to press CTRL + C.

I've been looking for the solution all day, I've tried the following things:

Reinstalling Flutter, Dart and Android Studio

Adding Flutter to the path

Deleting the cache folder

Disabling Antivirus

Running D:\Flutter\flutter\bin\cache\dart-sdk\bin\pub.bat upgrade --verbosity=error --no-packages-dir in D:\Flutter\flutter\packages\flutter_tools>

Everything didn't work.

As Mentioned, my Flutter SDK path is D:\Flutter\flutter

weazle
  • 15
  • 7
  • Try to delete the `cache` directory inside `bin` and then run `flutter doctor` again? What's the output? – Boken Mar 08 '21 at 23:24
  • Look like it is not in the path but can you post outputs of: `flutter --version` and `flutter doctor -v` – Msmkt Mar 08 '21 at 23:26
  • @Boken I already did that, it didn't help. I also cant run any flutter command, including flutter doctor. It always gives the output I mentioned in the question – weazle Mar 08 '21 at 23:26
  • @Msmkt I can't run any Flutter commands, it always gives the output mentioned in the question – weazle Mar 08 '21 at 23:28
  • Did you try to go to Flutter directory, reset changes (e.g. `git clean -df` or `git co -- .`) and fetch latest version (by `git pull`)? You can try also this one: https://stackoverflow.com/a/62095382/5529263 – Boken Mar 08 '21 at 23:28
  • Just did that, git pull says that Dart is up to date @Boken – weazle Mar 08 '21 at 23:30
  • And solution from the link? To clean all of the changes in Flutter. Or just to kill all of the dart processes `killall -9 dart` – Boken Mar 08 '21 at 23:31
  • @Boken if you mean the output of the clear change command, there wasn't an output – weazle Mar 08 '21 at 23:32
  • check your path, it might be because it is not in your path? have you tried running `flutter --version` from `D:\Flutter\flutter` directory? – Msmkt Mar 08 '21 at 23:34
  • @Msmkt that also gives me the error mentioned in the question. I can't run any flutter command – weazle Mar 08 '21 at 23:36
  • if you can't run flutter command from the folder where you installed it, in this case I would uninstall is completely and follow installation process form the beginning. Follow this: [link](https://flutter.dev/docs/get-started/install/windows#update-your-path) – Msmkt Mar 08 '21 at 23:41
  • @Msmkt I just did that, still doesn't work. Neither in a project nor in the Flutter path – weazle Mar 09 '21 at 11:25

1 Answers1

0

I installed flutter, dart and the app on my C:\ Drive and it worked for me!

weazle
  • 15
  • 7