macOS安装Flutter开发环境

本文详细介绍了在macOS系统中安装Flutter开发环境的步骤,包括安装Xcode和Android Studio,下载Flutter SDK,设置环境变量,执行flutter doctor,安装cocoapods,配置Android Studio插件,以及解决安装过程中遇到的错误和警告。
摘要由CSDN通过智能技术生成

1 先安装Xcode和Android Studio

2 设置环境变量

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

3 下载Flutter SDK

https://docs.flutter.dev/development/tools/sdk/releases

解压缩到指定目录比如

/Users/用户/program/flutter

4 修改环境变量

vi ~/.zshrc
export FLUTTER_HOME=/Users/用户/program/flutter 
export PATH=${PATH}:${FLUTTER_HOME}/bin
source ~/.zshrc

5 执行flutter doctor

flutter doctor
Running "flutter pub get" in flutter_tools...                      10.8s
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable,
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值