Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds

Tags:

flutter

dart

Log:

E:\Flutter>flutter doctor Checking Dart SDK version... Downloading Dart SDK from Flutter engine ead227f a... Unzipping Dart SDK... Updating flutter tool... Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...

Waiting for 0 seconds, press CTRL+C to quit ... Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...

Waiting for 0 seconds, press CTRL+C to quit ... Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...

Waiting for 0 seconds, press CTRL+C to quit ... Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...

Waiting for 0 seconds, press CTRL+C to quit ... Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...

Waiting for 0 seconds, press CTRL+C to quit ... Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...

Android studio log

like image 918
Shashank Shinde Avatar asked Mar 26 '18 17:03

Shashank Shinde


2 Answers

First Make sure you have a working internet connection and if this issue still exists then, this error may be because the dart sdk may have not been properly downloaded. The simplest solution is to delete the cache folder located in flutter/bin(location where flutter is installed) and then Run flutter doctor

like image 125
Mahesh Jamdade Avatar answered Sep 21 '22 15:09

Mahesh Jamdade


I fix that by:

  1. Ctrl+C to stop infinite error loop.
  2. Kill the Dart process in Windows Task Manager.
  3. Delete the cache folder located in flutter/bin directory.
  4. Run in command line flutter pub cache repair.

After that I run flutter doctor and get predictable results:

e:\tools>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version
    6.1.7601], locale ru-RU)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)

[√] Android Studio (version 3.6)
[!] IntelliJ IDEA Community Edition (version 2019.2)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Ultimate Edition (version 2019.2)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.44.2)
[√] Connected device (1 available)

! Doctor found issues in 2 categories.
like image 43
Anatolii Kosorukov Avatar answered Sep 19 '22 15:09

Anatolii Kosorukov