美文网首页
Mac配置Flutter

Mac配置Flutter

作者: Morgan7 | 来源:发表于2019-12-05 17:12 被阅读0次

    安装Flutter

    # 到用户目录
    cd ~
    #编辑profile文件
    vim .profile
    #添加环境变量
    export PATH="`$PWD`/flutter/bin:$PATH"
    
    • 检查flutter doctor
      提示我CocoaPods需要升级
      VS Code没有安装flutter插件
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.13.6 17G65, locale zh-Hans-CN)
    [✗] Android toolchain - develop for Android devices
        ✗ Unable to locate Android SDK.
          Install Android Studio from: https://developer.android.com/studio/index.html
          On first launch it will assist you in installing the Android SDK components.
          (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
          If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
          You may also want to add it to your PATH environment variable.
    
    [!] Xcode - develop for iOS and macOS (Xcode 10.1)
        ! CocoaPods out of date (1.6.0 is recommended).
            CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart
            side.
            Without CocoaPods, plugins will not work on iOS or macOS.
            For more info, see https://flutter.dev/platform-plugins
          To upgrade:
            sudo gem install cocoapods
    [!] Android Studio (not installed)
    [!] IntelliJ IDEA Ultimate Edition (version 2018.2.5)
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
    [!] VS Code (version 1.40.2)
        ✗ Flutter extension not installed; install from
          https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
    [!] Connected device
        ! No devices available
    
    ! Doctor found issues in 6 categories.
    
    
    • 按照提示 升级或安装自己的需要的即可
      升级后则可使用
      Xcode - develop for iOS and macOS (Xcode 10.1)
      VS Code (version 1.40.2)
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.13.6 17G65, locale zh-Hans-CN)
    [✗] Android toolchain - develop for Android devices
        ✗ Unable to locate Android SDK.
          Install Android Studio from: https://developer.android.com/studio/index.html
          On first launch it will assist you in installing the Android SDK components.
          (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
          If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
          You may also want to add it to your PATH environment variable.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 10.1)
    [!] Android Studio (not installed)
    [!] IntelliJ IDEA Ultimate Edition (version 2018.2.5)
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
    [✓] VS Code (version 1.40.2)
    [!] Connected device
        ! No devices available
    
    ! Doctor found issues in 4 categories.
    

    相关文章

      网友评论

          本文标题:Mac配置Flutter

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