Flutter国内无法pub get

表现现象为超时,无法执行

flutter packages get & flutter pub get

Windows增加环境变量

PUB_HOSTED_URL=https://pub.flutter-io.cn
FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

MacOS or Linux

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
git clone -b dev https://github.com/flutter/flutter.git
export PATH="$PWD/flutter/bin:$PATH"
cd ./flutter
flutter doctor

官网文章:https://flutter.dev/community/china

发表评论

电子邮件地址不会被公开。 必填项已用*标注