Reputation: 55
pub get failed command: "C:\src\flutter\bin\cache\dart-sdk\bin\dart __deprecated_pub --directory . get --example" pub env: {enter image description here "FLUTTER_ROOT": "C:\src\flutter", "PUB_ENVIRONMENT": "vscode.dart-code:flutter_cli:get", "PUB_CACHE": "C:\Uenter image description heresers\BOSS-PRYME\AppData\Local\Pub\Cache", }
Upvotes: 1
Views: 2851
Reputation: 61
For me, I was facing this error because my dart version was lower than my project requirement in pubspec.yaml, I changed my project version to match that of my dart sdk
Upvotes: 0
Reputation: 16
On Linux, this worked for me and for many other people... It should work for you too. export PUB_HOSTED_URL=https://pub.flutter-io.cn export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
On windows, you should create an environment variable with: name: PUB_HOSTED_URL value: https://pub.flutter-io.cn
name: FLUTTER_STORAGE_BASE_URL value: https://storage.flutter-io.cn
#Code gotten from MathiasGodwin on Grepper
Upvotes: 0