I was trying to configure my Flutter project to work on the web. I switched to the master channel using flutter channel master
after doing this I tried to run flutter upgrade
. I am now getting an infinite loop saying:
Building flutter tool...
Running pub upgrade...
Pub failed to delete entry because it was in use by another process.
This may be caused by a virus scanner or having a file
in the directory open in another application.
Error (1): Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)
Waiting for 0 seconds, press CTRL+C to quit ...
Running pub upgrade...
Pub failed to delete entry because it was in use by another process.
This may be caused by a virus scanner or having a file
in the directory open in another application.
Error (1): Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (8 tries left)
Waiting for 2 seconds, press CTRL+C to quit ...
Terminate batch job (Y/N)? Y
I have tried multiple things such as running flutter clean
, trying to change back to the stable channel, deleting the cache folder in the flutter/bin directory, turning off my windows defender, nothing seems to work. Now when I try to run flutter doctor
, or any other flutter command, I get the same infinite loop with the same message. I have also tried manually downloading and replacing my flutter sdk installation with a new installation, this did not work either. Is my only option at this point to delete flutter completely and reinstall from scratch?
I would appreciate any suggestions on how to fix this.
I was running into this issue and discovered that the problem was a new dependency that I added. In my case it was assets_audio_player: ^3.0.3+1
, but of course it could be any dependency. Deleting it immediately fixed my problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With