Flutter解决Running "flutter packages get" in flutter_first_app...卡住的问题

1、碰到这个问题后我又点了一次pubspec.yaml文件里面的Packages get结果又出现了Waiting for another flutter command to release the startup lock...的问题。所以只能先解决这个问题咯

经过查找资料发现只要删除 如下图的那个lockfile文件即可,有时候你会删除失败,这时候去进程中把dart.exe进程关闭即可

到这里我们就解决了这个衍生问题。

2、接下来解决Running "flutter packages get" in flutter_first_app...卡住  问题:

只要在pubspec.yaml文件里面加上以下两句话:

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

然后点击Flutter doctor即可

然后再把这两句话删掉,重新 点击Packages get就会出现:

到这里就一切ok了!

发布了26 篇原创文章 · 获赞 5 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq_26923265/article/details/105133582