国内下载Flutter

出现镜像错误等现象属于源码包不全面,国内下载镜像添加环境变量。

①: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

②:Windows执行如下操作

添加环境变量

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

在原来不完整的包下执行flutter doctor

    原文作者:Li_Zengjie
    原文地址: https://blog.csdn.net/ludlee/article/details/79758782
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞