Flutter sdk 中不小心删除了 pub-cache

xcs*_*sob 0 caching flutter

我不小心删除了 flutter sdk 中的 pub-cache,现在每当我尝试在网络上运行 flutter 应用程序时,我都会收到此错误:

完成时出现错误:参数无效:找不到与 fileSystemPath“/Users/xxxxx/flutter/.pub-cache/hosted/pub.dartlang.org/devtools-0.1.15/build”对应的目录

我该如何解决这个问题?

我已经尝试恢复 pub-cache 但它不起作用。

我该如何解决这个问题?

Chr*_*ore 5

使用flutter pub cache repair。它应该解决这个问题。请参阅pub 缓存以供参考。