更新/.pub-cache 中的 flutter 依赖项 [英] Update flutter dependencies in /.pub-cache

查看:65
本文介绍了更新/.pub-cache 中的 flutter 依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

What is the command to update the dependencies inside pubsec.yaml? I believe it is

flutter 包获取

flutter packages get

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

The folder under .pub-cache is still not up to date.

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

推荐答案

pubspec.yaml中的dependencies中移除包,运行flutter packages get.然后再次将包添加到dependencies并运行flutter packages get.这个过程已经为我解决了过去的问题.

Remove the package from dependencies in pubspec.yaml, run flutter packages get. And then add the package to dependencies again and running flutter packages get.This process has solved the problem for me in the past.

这篇关于更新/.pub-cache 中的 flutter 依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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