Waiting for another flutter command - flutter项目

已解决:Waiting for another flutter command to release the startup lock...

找到flutter安装目录bin里的lock文件删除它:

..\flutter\bin\cache\lockfile

如果不让删除,结束dart进程。

此类情况,可能是下载进度过慢和无法下载依赖包,意外中止导致,可通过配置镜像解决:

Windows:

添加环境变量:

PUB_HOSTED_URL=https://pub.flutter-io.cn
FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

Unix:

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn