Flutter doesn't start - flutter

if I Open Vs code and try to code, or try to use the command flutter, flutter doctor etc. in the Terminal, It doesn't work and just says:
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)
Failed to start the Dart CLI isolate. Could not resolve DartDev snapshot or kernel.
(null).
Later it says in an little Window at the bottom lefthand corner:
Failed to initialize Flutter: Process exited with code 1.
And I use the Mac with Mac chip!

Related

Flutter Error : .../packages/flutter_tools: No such file or directory - install

I just want to install flutter correctly on linux , many time I get this Errors:
/home/beit/snap/flutter/common/flutter/bin/internal/shared.sh: line 24: cd: /home/beit/snap/flutter/common/flutter/packages/flutter_tools: No such file or directory
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)
I saw some solutions for this problem such as deleting the "bin" folder, run pub repair, and stuff
but they could not solve the problem
I just want to start Flutter
note: I download the Dart SDK package many times, and use "flutter doctor"
I use the following command line for installation (as Linux install doc in flutter.dev):
sudo snap install flutter --classic
i found the solution , use manually install to solve this problem
1- first delete your previous version of flutter use :
snap remove flutter
2- next , download flutter SDK from here:
please download stable channel
3- follow this link: if you use Linux
4 - do the optionally step:
flutter precache
done! , you can use "flutter doctor" command line to check other things.

Flutter create--Template module-overwrite

I trying to create a new flutter project under VS Code IDE. I install the flutter extension, but not running any project its shows running status in the notification as well shows the output as follows.
Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (3 tries left)
Running pub upgrade...
Could not find a file named "pubspec.yaml" in "C:\src\Flutter\.pub-cache\hosted\pub.dartlang.org\analyzer-1.5.0".
Error (66): Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (2 tries left)
Running pub upgrade...
Could not find a file named "pubspec.yaml" in "C:\src\Flutter\.pub-cache\hosted\pub.dartlang.org\analyzer-1.5.0".
Error (66): Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (1 tries left)
Error: 'pub upgrade' still failing after 10 tries.

Can't run any Flutter Command because Flutter fails to update Flutter Tool

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
I installed flutter, dart and the app on my C:\ Drive and it worked for me!

Flutter keeps in "Flutter Setup: Running pub upgrade" forever

I recently changed some things in my project ( not in the pubspec.yaml file until then ) and since then, everytime I open the project, a message pops up in the bottom right corner saying "Flutter Setup: Running pub upgrade ".
I tried:
Installing dart and flutter extentions new.
Reinstalling VS-Code
Delete the Versions next to the dependencies and re-adding the newest version of each package.
To reproduce:
clone "https://github.com/IfClause/info_app_project.git" and open in VS-Code.
Thanks!
Output of 'flutter pub upgrade':
Running pub upgrade...
Error (1): Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (8 tries left)
Running pub upgrade...
Error (1): Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (7 tries left)
Running pub upgrade...
And so on.
Sometimes there are some mysterious issues with Flutter's cache.
If it is the case, flutter clean && flutter doctor should do it for you.
Also, it can happen to people with poor connections or behind firewalls.

Unable to run flutter commands

When I had previously setup flutter, all was working well, however, now all of the flutter commands are resulting in this error:
Error: Error when reading '../../../../documents/flutter/bin/cache/dart-sdk/bin/snapshots/pub.dart.snapshot': No such file or directory
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (1 tries left)
Command 'pub upgrade' still failed after 10 tries, giving up.```
How do I solve this?
Looks like something went wrong while downloading the dart sdk. Can you delete the cache folder inside bin and then run flutter doctor again? What's the output?
Are you by any chance behind a firewall (or using a proxy) that might be blocking the download of the dart sdk?