MAC 安装flutter

安装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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
禁止转载,如需转载请通过简信或评论联系作者。

友情链接更多精彩内容