当前位置:   article > 正文

mac M1 安装flutter_flutter (channel stable, 3.22.1, on macos 14.4.1 2

flutter (channel stable, 3.22.1, on macos 14.4.1 23e224 darwin-arm64, locale

M1 安装 Flutter

1- 官网下载flutter SDK 盘符自己记好

https://docs.flutter.dev/release/archive?tab=macos
  • 1

2- 控制台配置环境变量

open .zshrc  / bash_profile //平常在哪配就打开哪个文件
  • 1

3- 复制粘贴

export PATH="$PATH:/Users/xnr/Documents/flutter/bin:$PATH" // 自己安装的目录
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
  • 1
  • 2
  • 3

4- 控制台执行

$ flutter doctor


Doctor summary (to see all details, run flutter doctor -v):
[] Flutter (Channel stable, 3.19.6, on macOS 14.1.1 23B81 darwin-arm64, locale
    zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for
      more details.
[!] Xcode - develop for iOS and macOS (Xcode 15.3)
    ! CocoaPods 1.12.1 out of date (1.13.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 see
      https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods
      for instructions.
[] Chrome - develop for the web
[] Android Studio (version 2022.3)
[] IntelliJ IDEA Ultimate Edition (version 2023.2.5)
[] VS Code (version 1.81.1)
[] Connected device (2 available)
    ! Error: Browsing on the local area network for 菠萝
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/710675
推荐阅读
相关标签