美文网首页
MAC 安装flutter

MAC 安装flutter

作者: 殇城阡陌 | 来源:发表于2020-05-13 11:15 被阅读0次

    安装flutter

    1.安装android studio ,打开配置plugin 下载安装flutter

    2.android sdk,打卡sdk文件夹下tools/android,下载所需sdk版本,

    配置环境变量

           exportANDROID_HOME=/Users/cody/App/android-sdk-macosx

            export PATH=${PATH}:${ANDROID_HOME}/platform-tools

            export PATH=${PATH}:${ANDROID_HOME}/tools

            export PATH=${PATH}:${ANDROID_HOME}/build-tools/28.0.3

    【1】、Android toolchain - develop for Android devices (Android SDK version28.0.3)

                ! Some Android licenses not accepted. To resolve this, run: flutterdoctor

            –android-licenses

            本机已安装了AndroidSDK,Android许可不被接受,需要执行以下命令,同意许可

              flutter doctor --android-licenses

                    如果报错Error: Unknown argument --licenses,

                    执行(确认java版本为java8/jdk1.8)

                          /Users/yangshanshan/Documents/download-program/android-sdk-macosx/tools/bin/sdkmanager --update

            

    【2】、Xcode - develop for iOS and macOS

            ✗Xcode installation is incomplete;a full installation is necessary for iOS development.    

            Download at: https://developer.apple.com/xcode/download/

            Or install Xcode via the App Store.

            Once installed, run:

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

            本机已安装了xcode,那就是需要执行以下命令

            cmd

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

            sudo xcodebuild -license

    【3】、Android Studio (version 3.4)

            ✗Flutter plugin not installed; thisadds Flutter specific functionality.

            ✗Dart plugin not installed; thisadds Dart specific functionality.

            本机已安装Android Studio,但是缺这两个插件,需要我们去安装一下。

            打开Android Studio->configure->Plugins

            搜索flutter 进行install

    相关文章

      网友评论

          本文标题:MAC 安装flutter

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