我在我的文件夹 .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/