Flutter 环境配置

Flutter 环境配置


1.下载最新的Flutter SDK

https://flutter.dev/docs/get-started/install/macos

2.下载后解压到你要放的位置

cd ~/development

unzip ~/Downloads/flutter_macos_1.22.5-stable.zip

3.添加到自己路径中

添加 flutter 相关⼯具到path中, 这里还是存放在自己的.bash_profile 文件里面

export PATH=/Users/luobo/Documents/development/flutter/bin:$PATH  这个是我自己

export PATH=`⾃⼰存放flutter的路径`/flutter/bin:$PATH  大家按照这个格式配置

运行flutter doctor

出现以上问题输入

luobodeMacBook-Pro:development luobo$ export PUB_HOSTED_URL=https://pub.flutter-io.cn

luobodeMacBook-Pro:development luobo$ export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

再次运行flutter doctor


等待些许时间

这个时候,flutter基本是安装完成了,但是由于我电脑最近刚装系统好多的东西还不全

安装Android Studio

安装的时候一切都正常,但是在安装flutter 和dart插件的时候出现了问题













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


mac 上配置flutter开发环境 flutter安装入门教程

https://www.aliyue.net/9289.html

Flutter中文网

https://flutterchina.club/

https://flutter.dev/docs/get-started/install/macos

你可能感兴趣的:(Flutter 环境配置)