日志:
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...
最佳答案
首先确保您的互联网连接正常,如果此问题仍然存在,则此错误可能是因为 dart sdk 可能未正确下载。
最简单的解决方案是删除位于
flutter/bin
(安装flutter的位置)然后运行flutter doctor
关于flutter - 错误 : Unable to 'pub upgrade' flutter tool. 五秒后重试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49497109/