简体   繁体   English

面临构建 flutter 工具的问题......同时更新 flutter

[英]Facing issue building flutter tool… while updating flutter

I am just to trying updating my flutter using flutter upgrade command.But while updating it stuck at我只是想尝试使用flutter 升级命令更新我的 flutter。但是在更新它时卡在
building flutter tool... .构建 flutter 工具...... I don't know why.我不知道为什么。 After waiting 4-5 minutes i close my terminal and tried to run again flutter upgrade but no use.等待 4-5 分钟后,我关闭终端并尝试再次运行flutter 升级但没有用。 If anybody faced this issue before please help.如果有人以前遇到过这个问题,请帮忙。

This is a bit old question but for anyone coming here lately let me try to answer it.这是一个有点老的问题,但对于最近来这里的任何人,让我试着回答一下。

Since I faced this issue multiple times I think it will be helpful to share how I solved it.由于我多次遇到这个问题,我认为分享我如何解决它会有所帮助。 I found that being stuck at "building flutter tool..." happens usually because of these reasons:我发现卡在“构建 flutter 工具...”通常是因为以下原因:

  1. Make sure you have a working internet connection: check issues like this one on stackoverflow确保您有一个有效的互联网连接:在 stackoverflow 上检查类似这样的问题
  2. If there is a dart process running while showing the "building flutter tool..." message, be pateint and let it finish as @pskink commented.如果有一个 dart 进程正在运行,同时显示“正在构建 flutter 工具...”消息,请按照@pskink 的评论完成专利并让它完成。
  3. If there are multiple dart processes running then it maybe waiting for another command to release so stop them or try running killall dart on terminal and rerunning flutter doctor如果有多个 dart 进程正在运行,那么它可能正在等待另一个命令释放所以停止它们或尝试在终端上运行killall dart并重新运行flutter doctor
  4. Delete the cache folder located in flutter/bin directory.(I haven't done this but seems to work for some)删除位于 flutter/bin 目录中的缓存文件夹。(我没有这样做,但似乎对某些人有用)

I don't necessarily think this will solve all similar issues but it was how I solved them many times.我不一定认为这会解决所有类似的问题,但这是我多次解决它们的方式。 But I think a detailed log would have been better from flutter.但我认为 flutter 的详细日志会更好。 Also checkout this issue on github.请在 github 上查看此问题。 . .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM