问题
I erased in my folder .pub-cache/hosted/pub.dartlang.org/this_plugin
What is the command to update the dependencies inside pubsec.yaml
? I believe it is
flutter packages get
The folder under .pub-cache
is still not up to date.
Note: there was a pubspec.lock
that I deleted
回答1:
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.
回答2:
flutter pub cache repair
or delete /Users/xxxxxxx/development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/
and run flutter packages get
again.
来源:https://stackoverflow.com/questions/55399209/update-flutter-dependencies-in-pub-cache