u_s_e_r
u_s_e_r

Reputation: 183

flutter pub get won't download dependency

I deleted a package manually from Dart Package directory and deleted pubspec.lock. Now when I do flutter pub get it does not download that package again. I tried flutter clean && flutter pub get but it's not working as well. Please help I can't build my project now.

Upvotes: 1

Views: 525

Answers (2)

jeffrey.d.m
jeffrey.d.m

Reputation: 867

The other answer didn't do anything, and based on the comment of u_s_e_r, the actual fix is: https://dart.dev/tools/pub/cmd/pub-cache

dart pub cache repair

This worked in my case

Upvotes: 2

JustTheCode
JustTheCode

Reputation: 26

You can try to close and then open the editor and try:

flutter clean

flutter packages get

flutter packages upgrade

Upvotes: 1

Related Questions