美文网首页Flutter
第一章:Flutter环境配置

第一章:Flutter环境配置

作者: Mr姜饼 | 来源:发表于2021-05-12 09:54 被阅读0次

    首先附上环境搭建成功的截图


    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按下图操作即可。

    image.png

    安装环境大概就这些内容,如果有不懂的,去看看其他人发的帖子,楼主是一下在就成功了😂

    完结 ✿✿ヽ(°▽°)ノ✿

    相关文章

      网友评论

        本文标题:第一章:Flutter环境配置

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