Martins
Martins

Reputation: 55

How can i solve this pub deprecated pub

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

Answers (2)

KWAME EMMANUEL SABLAH
KWAME EMMANUEL SABLAH

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

Victor Santos
Victor Santos

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

This answer came from https://stackoverflow.com/questions/64588402/flutter-pub-get-takes-too-long-to-execute#:~:text=Step%201%3A%20flutter%20clean%20step,dependencies%20and%20slow%20internet%20connection.&text=Save%20this%20answer.,-Show%20activity%20on

Upvotes: 0

Related Questions