美文网首页
Mac 安装Flutter环境

Mac 安装Flutter环境

作者: CCSHCoder | 来源:发表于2019-12-09 15:06 被阅读0次
安装flutter

//打开环境变量配置

open ~/.bash_profile

//没有创建

touch ~/.bash_profile

//加入下面环境变量

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

export FLUTTER_STORAGE_BASE_URL=[https://storage.flutter-io.cn](https://storage.flutter-io.cn)

//生效

source ~/.bash_profile

git clone [https://git.coding.net/CocoaPods/Specs.git](https://git.coding.net/CocoaPods/Specs.git) ~/.cocoapods/repos/master

//下载安装flutter

git clone -b master [https://github.com/flutter/flutter.git](https://github.com/flutter/flutter.git)

./flutter/bin/flutter --version

//打开环境变量配置

open ~/.bash_profile

//加一行 

//`pwd` 安装目录

export PATH**=**"$PATH:`pwd`/flutter/bin"

如

export PATH="$PATH:/Users/admintrator/flutter/bin"

//生效

source ~/.bash_profile

//安装其他(有的就不用安装了)

brew install libimobiledevice ideviceinstaller ios-deploy cocoapods

//检测配置

flutter doctor -v

//出错的根据提示修改

其他

//创建flutter

flutter create flutter_module

//升级

flutter upgrade

//查看环境

flutter channel 

//切换环境

flutter channel 环境

//创建插件

flutter create --template=plugin platform_view

相关文章

网友评论

      本文标题:Mac 安装Flutter环境

      本文链接:https://www.haomeiwen.com/subject/czjwjctx.html