为什么Flutter pub缓存修复会下载以前使用的每个软件包版本? [英] Why flutter pub cache repair downloads every package version previously used?

查看:229
本文介绍了为什么Flutter pub缓存修复会下载以前使用的每个软件包版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

命令 flutter pub cache repair 下载以前使用的每个软件包版本,甚至包括我不再使用的库.为什么?

The command flutter pub cache repair downloads every package version previously used, even of libraries that I no longer use. Why?

有什么方法可以清理所有内容并仅下载最新的软件包版本?

Is there any way to clean everything and download only the last packages version?

推荐答案

不幸的是,Dart开发团队认为磁盘空间问题已成为过去,并且没有提供清除全局缓存的标准命令.

Unfortunately, Dart development team believes that disk space problems are a thing of the past, and does not provide a standard command to clear the global cache.

因此,只有一种方法-自己清除文件夹〜/.pub-cache/hosted/pub.dartlang.org .然后,您可以分别为每个实际应用程序重新安装软件包.

Therefore, there is only one way - it is to clear the folder ~/.pub-cache/hosted/pub.dartlang.org yourself. You can then reinstall packages for each actual application separately.

这篇关于为什么Flutter pub缓存修复会下载以前使用的每个软件包版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆