Flutter开发环境搭建配置

WallaceFabian 发布于11月前

Futter开发环境搭建配置

Flutter SDK的获取

首先,从GitHub官网下载Flutter SDK。或者,先下载git,然后安装git,打开Git Bash,在窗口中输入

git clone -b master https://github.com/flutter/flutter.git

由于,谷歌的原因,我们需要镜像地址更改一下(根据官网提示:The Flutter team cannot guarantee long-term availability of this service. ):

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

或者,使用上海交通大学的 Linux User Group :

export PUB_HOSTED_URL= https://dart-pub.mirrors.sjtug.sjtu.edu.cn/
export FLUTTER_STORAGE_BASE_URL= https://mirrors.sjtug.sjtu.edu.cn/

然后接着输入:

export PATH="$PWD/flutter/bin:$PATH"

注意:$PWD为你安装Flutter的路径
安装完后,在环境变量中,静Flutter的安装地址配置到Path变量中。

最后,运行flutter doctor

查看原文: Flutter开发环境搭建配置

  • blueelephant
  • redostrich
  • tinybutterfly
  • blackpeacock
  • whiteostrich
  • lazymouse342
  • yellowdog860
  • beautifulpanda