美文网首页
1.mac安装flutter

1.mac安装flutter

作者: 未来小文学家 | 来源:发表于2019-10-24 10:47 被阅读0次

1.下载flutter sdk https://flutter.dev/docs/development/tools/sdk/releases?tab=macos

2.配置环境变量

打开.bash_profile文件

open $HOME/.bash_profile

将下面内容配置到.bash_profile文件中

export PUB_HOSTED_URL=https://pub.flutter-io.cn //国内用户需要设置
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn //国内用户需要设置
export PATH=(sdk目录)/flutter/bin:$PATH

执行.bash_profile文件

source $HOME/.bash_profile

3.iOS 设置

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license
brew update
brew install --HEAD libimobiledevice
brew install ideviceinstaller ios-deploy cocoapods
pod setup

4.新建flutter项目

sudo flutter create demoName

5.修改flutter sdk权限和项目权限

sudo chmod -R 777 sdk目录
sudo chmod -R 777 项目目录

相关文章

网友评论

      本文标题:1.mac安装flutter

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