[Flutter]在Mac上安装Flutter运行环境

一、安装Xcode

二、安装Android Studio

三、安装brew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

四、下载Flutter SDK

地址:https://flutter.dev/docs/development/tools/sdk/releases#macos

五、解压缩到合适的目录

六、配置环境变量,设置代理

vim ~/.bash_profile

添加

export PATH=地址/flutter/bin:$PATH

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

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

 

七、加载环境变量

source ~/.bash_profile

八、检测是否安装成功

flutter -h

九、运行doctor

flutter doctor

十、配置环境

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer 

brew update

brew install --HEAD usbmuxd

brew link usbmuxd

brew install --HEAD libimobiledevice 

brew install ideviceinstaller ios-deploy cocoapods

pod setup

十一、创建项目

cd 合适的位置

flutter create flutterdemo

十二、打开iPhone模拟器

open -a Simulator

十三、运行iOS应用

cd demo位置

flutter run

 

posted @   EverNight  阅读(186)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端
点击右上角即可分享
微信分享提示