首先附上环境搭建成功的截图
image.png
Flutter环境搭建
step1:
安装javasdk
step2:
安装FlutterSDK
下载成功后,解压到/User/用户名/ 目录下。之后的.bash_profile需要配置用到
step3:
安装Android Studio
安装成功之后,记得去下载插件“Flutter”
image.png
step4:
安装Xcode
附上.bash_profile
export PATH=/Users/mac/flutter/bin:$PATH
export ANDROID_HOME=/Users/mac/Library/Android/SDKs
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/emulator
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
# 新增一行
export HOMEBREW_NO_AUTO_UPDATE=true
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
附上 .zshrc
#Flutter 镜像配置
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
#Flutter 配置
export FLUTTER=/Users/mac/flutter/bin
export PATH=$FLUTTER:$PATH
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
当遇到flutter doctor --android-licenses
出错时,打开Android Studio按下图操作即可。
安装环境大概就这些内容,如果有不懂的,去看看其他人发的帖子,楼主是一下在就成功了😂
完结 ✿✿ヽ(°▽°)ノ✿
网友评论