DevAdedoyin
DevAdedoyin

Reputation: 71

Running Pub Upgrade in flutter installation taking too much time

I have a serious issue trying to install flutter... The pub upgrade when you run flutter doctor have being running for the past one hour on my system... I have being stuck with this issue since yesterday i don't know what the exact problem is... I have tried installing via Android Studio and through command line... It ends up getting stuck at "Running Pub Upgrade"... enter image description here

Upvotes: 6

Views: 10489

Answers (5)

NullByte08
NullByte08

Reputation: 1032

Here are all the steps that I performed to fix this:

  • Close Android studio
  • Open Task Manager and see if any Dart/Flutter services are running, if yes then close them.
  • Clear cache from <path to your Flutter SDK>\flutter\bin folder:
    1. <path to your Flutter SDK>\flutter\bin\cache\ go to this path
    2. sort by date modified
    3. cut the files that were modified recently (today) and paste them somewhere else as a backup.
  • Open Android Studio and let it complete the processes
  • It may ask for Flutter SDK and Dark SDK paths, open Android Studio settings (Languages & Frameworks > Dart and Languages & Frameworks > Flutter) and mention the paths
    1. Dart SDK path is usually in <path to your Flutter SDK>\flutter\bin\cache\dart-sdk

Upvotes: 0

Craig Van Rensburg
Craig Van Rensburg

Reputation: 21

I also had this problem. It was stuck on "Running pub upgrade..." for more than 24 hours.

On this GitHub thread someone solved it by turning Anti-virus shields off. [https://github.com/flutter/flutter/issues/61719][1] (Stuck at Running pub upgrade)

This solved the issue for me. I closed Windows PowerShell, and turned off Avast Anti-virus shields. I re-opened Windows PowerShell, ran flutter doctor and all went through perfectly with no issues.

Upvotes: 2

Precious Olusola
Precious Olusola

Reputation: 1

I also encountered the same problem, but I solved it using another computer, what I did was;

I cleared my cache folder in flutter/bin folder then I copied the folder containing flutter SDK into another computer *C:* drive so the folder was like C:\src\flutter on the other computer(which was windows also), opened the folder, opened flutter console, and run flutter doctor. it worked fine on that computer, everything was in place, so I copied that same folder again back into my computer, replacing all exiting files and run flutter doctor on my computer and it worked for me.

Upvotes: 0

DevAdedoyin
DevAdedoyin

Reputation: 71

I was a able to solve this problem, by downloading the flutter zip file in the flutter website, adding flutter/bin directory to my environment variables Path, restarting my system and running flutter doctor...

Upvotes: 0

Ketan Ramteke
Ketan Ramteke

Reputation: 10651

Here are a few things you can try,

Close Android studio,

Open Task Manager and see if any Dart/Flutter services are running, if yes then close them.

Clear cache from flutter/bin folder.

and now run again.

Upvotes: 5

Related Questions