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.
Related
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.
Hy hope so all are good and fine! i am new to flutter and after updating flutter version to 2.5 i am facing this type of errors as in images below enter image description here
enter image description here
Error is:
flutter pub get
Could not resolve URL "https://pub.dartlang.org".
pub get failed (server unavailable) -- attempting retry 1 in 1 second...
Could not resolve URL "https://pub.dartlang.org".
pub get failed (server unavailable) -- attempting retry 2 in 2 seconds...
Running "flutter pub get" in flutter_application_1...
Just accept android licenses to the run below command on terminal, I also face this problem when I upgrading my flutter and I have solve my issue on below command, hope its help to you
flutter doctor --android-licenses
And accept the terms on the terminal
After installing flutter sdk, android studio, and flutter plugin..
*1st I copied Android SDK tools manually because android studio didn't download it from web !!
*2nd When I tried to write "flutter doctor" in the command line, it didn't going well, and this is what actually happend.
PS C:\Users\MQ> flutter doctor -v
Got TLS error trying to find package node_preamble at https://pub.dartlang.org.
pub get failed (server unavailable) -- attempting retry 1 in 1 second...
Got TLS error trying to find package node_preamble at https://pub.dartlang.org.
pub get failed (server unavailable) -- attempting retry 2 in 2 seconds...
Got TLS error trying to find package node_preamble at https://pub.dartlang.org.
pub get failed (server unavailable) -- attempting retry 3 in 4 seconds...
Running "flutter pub get" in flutter_tools...
|
I had same issue, I changed my network connection but I have had same issue. So to resolve this problem I changed flutter version to 1.22.6, This version works for me and I didn't get these errors with this version.
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!
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?