美文网首页
Flutter环境安装

Flutter环境安装

作者: wangyu2488 | 来源:发表于2019-07-17 19:28 被阅读0次

    1.下载 Flutter SDK

    https://flutter.dev/docs/development/tools/sdk/releases?tab=macos#macos

    https://github.com/flutter/flutter/releases

    2.设置环境变量

    echo "export PATH=$PATH:/Users/mac/Documents/flutter/bin">>~/.profile

    source ~/.profile

    下面两句【RN已经设置过了 可以不用设置

    echo "export ANDROID_HOME=/Library/Android/sdk">>/.profile

    echo "export PATH=ANDROID_HOME/tools:ANDROID_HOME/platform-tools:$PATH">>~/.profile

    3.运行

    flutter doctor


    image.png

    按提示安装即可


    image.png
    其他备份
    If you need to have libxml2 first in your PATH run:

    echo 'export PATH="/usr/local/opt/libxml2/bin:$PATH"' >> ~/.bash_profile
    For compilers to find libxml2 you may need to set:
    export LDFLAGS="-L/usr/local/opt/libxml2/lib"
    export CPPFLAGS="-I/usr/local/opt/libxml2/include"
    For pkg-config to find libxml2 you may need to set:
    export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig”
    4.打开ios模拟器
    open -a Simulator
    5.安装其他命令
    brew install --HEAD libimobiledevice
    brew install ideviceinstaller ios-deploy cocoapods
    pod setup
    6.用android stuodio创建一个demo运行效果如下


    image.png

    如果您发现本文对你有所帮助,如果您认为其他人也可能受益,请把它分享出去。

    相关文章

      网友评论

          本文标题:Flutter环境安装

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