Flutter安装

2020-03-13  本文已影响0人  吃不胖的瘦子呀

flutter安装 --- Mac环境

终端
cd xxx
git clone -b master https://github.com/flutter/flutter.git
./flutter/bin/flutter --version
open ~/.bash_profile
export PUB_HOSTED_URL=https://pub.flutter-io.cn   //国内用户需要设置
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn   //国内用户需要设置
export PATH=`xxx`/flutter/bin:$PATH   (xxx)为flutter sdk安装地址
如果使用的是zsh,终端启动时 ~/.bash_profile 将不会被加载,解决办法就是修改 ~/.zshrc ,在其中添加:source ~/.bash_profile
source ~/.bash_profile
flutter doctor
上一篇下一篇

猜你喜欢

热点阅读