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.
Related
I'm installing Androit Studio in the second, but there were no such problems before. I am getting the following error in terminal -
fatal: git repository (or one of parent directories) not found: .git
Building flutter tool...
/home/daniil/snap/flutter/common/flutter/bin/internal/shared.sh: line 24: cd: /home/daniil/snap/flutter/common/flutter/packages/flutter_tools: No such file or directory
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (2 tries left)
/home/daniil/snap/flutter/common/flutter/bin/internal/shared.sh: line 24: cd: /home/daniil/snap/flutter/common/flutter/packages/flutter_tools: 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.
Also, I tried to create a new flutter project in android studio, and tried to specify the path to the flutter sdk, but I get the message -
Flutter SDK is not found in the specified location.
Although, I drive the path according to the results of the flutter sdk-path conmada
Please help solve this problem!
PS: It's definitely not a network problem.
PSS: deleting the cache folder doesn't help
PSS: When I command git status, I get the error "On the stable branch
Your branch has been updated to reflect "origin/stable".
nothing to commit, no changes in working directory
All activies -
daniil#daniil-laptop:~/flutter$ git status
On the stable branch
Your branch has been updated to reflect "origin/stable".
nothing to commit, no changes in working directory
daniil#daniil-laptop:~/flutter$ flutter doctor
fatal: git repository (or one of parent directories) not found: .git
Building flutter tool...
/home/daniil/snap/flutter/common/flutter/bin/internal/shared.sh: line 24: cd: /home/daniil/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)
/home/daniil/snap/flutter/common/flutter/bin/internal/shared.sh: line 24: cd: /home/daniil/snap/flutter/common/flutter/packages/flutter_tools: No such file or directory
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (8 tries left)
I decided to remove the flutter that I installed via snap. And cloned the repository from git. But I realized that there are no cache folders.
When executing all the above commands - the errors do not change
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!
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.
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.
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?