flutter - 更新/.pub-cache 中的 flutter 依赖

标签 flutter flutter-dependencies flutter-plugin

我在我的文件夹 .pub-cache/hosted/pub.dartlang.org/this_plugin 中删除了

pubsec.yaml 中更新依赖项的命令是什么? 我相信是

flutter packages get

.pub-cache 下的文件夹仍然不是最新的。

注意:我删除了一个pubspec.lock

最佳答案

Disclaimer: By running the command below, have a really fast internet connection or be ready to lose one hour of productive hours. ( it will redownload every package every installed on your pc, and I mean each and all of the versions of each packages)~TSR

flutter pub cache repair 

或者删除/Users/xxxxxxx/development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/ 然后运行flutter包再次获取

如果以上所有操作都失败,请删除缓存文件夹或同时检查锁定文件中更新的版本(有时锁定会给我更新版本号的问题)

附言: Why flutter pub cache repair download every package version previously used?

关于flutter - 更新/.pub-cache 中的 flutter 依赖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55399209/

相关文章:

android - Flutter 文本按钮波纹效果

android - 添加 'tools:replace="android :label"' to <application> element at AndroidManifest. xml:16:5-39:19 覆盖

flutter - 从不同的隔离中调用顶级异步函数

dart - 在 Flutter 应用程序中存储 API 凭据

ios - Flutter 设备抖动 iOS 插件

Flutter 2.5 更新 - 每个静态小部件上的 const 关键字

flutter - 在 get_it Flutter 中注册依赖的异步服务定位器

dart - 谁应该被认为是 pubspec.yaml 中的作者?

flutter - 使用 flutter 插件时出现 MissingPluginException

image - 无法使用Flutter channel 共享文件-缺少插件异常