问题
- flutter doctor 下载Dart SDK失败;
- Flutter 项目创建/升级失败;
Waiting for another flutter command to release the startup lock...
;
1、flutter doctor 下载Dart SDK失败
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine e61bb9ac3a3fd789754e2e54220bcfc27076a857...
Start-BitsTransfer : 无法启动服务,原因可能是已被禁用或与其相关联的设备没有启动。 (异常来自 HRESULT:0x80070422)
所在位置 C:\Users\Administrator\flutter\bin\internal\update_dart_sdk.ps1:47 字符: 1
+ Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Start-BitsTransfer],COMException
+ FullyQualifiedErrorId : StartBitsTransferCOMException,Microsoft.BackgroundIntelligentTransfer.Management.NewBits
TransferCommand
Error: Unable to update Dart SDK. Retrying..
解决
右键-->任务管理器--> 服务-->打开服务。
找到Block Level Backup Engine Service
,右键属性,将启动状态改成手动,确定并重试。
2、Flutter 项目创建/升级失败
Got socket error trying to find package coverage at http://pub.dartlang.org
Error: Unable to pub upgrade flutter tool. Retrying in five seconds…
原因与解决,参阅 this wiki article
添加两个用户变量
3、Waiting for another flutter command to release the startup lock...
-
打开资源管理器,结束 dart 进程;
-
删除 flutter 安装目录
/bin/cache/
下的 lockfile文件,重启 Android Studio。