Flutter Environmental Installation

Install

Notion -- The all-in-one workspace for your notes, tasks, wikis, and databases.A new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your teamhttps://www.notion.so/serious-lose/Flutter-Environmental-Installation-ead2ea1520ba4129bda14372694b9d7e?pvs=4

复制代码
// 安装dart
brew install dart

✘ @HLFdeMacBook-Pro  ~  flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.8, on macOS 13.6 22G120 darwin-x64, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    ✗ 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.0.1)
    ✗ Unable to get list of installed Simulator runtimes.
    ✗ CocoaPods not installed.
        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 install see <https://guides.cocoapods.org/using/getting-started.html#installation> for instructions.
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] VS Code (version 1.78.1)
[✓] Connected device (2 available)

Android Studio (not installed)

Xcode - develop for iOS and macOS (Xcode 15.0.1)

  • 更新Xcode

CocoaPods not installed

复制代码
// 查看是否安装
gem list

*** LOCAL GEMS ***
...
cocoapods (1.14.2)
cocoapods-core (1.14.2, 1.13.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (2.0, 1.6.3)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
cocoapods-try (1.2.0)
colored2 (3.1.2)
...

// 卸载 cocoapods
sudo gem uninstall cocoapods

// 重新安装
sudo gem install -n /usr/local/bin cocoapods
  • 如果之前已经安装可以安装不成功

    // 更新Homebrew
    brew update

    // 更新最新版本Homebrew
    brew update-reset

    // 更新Homebrew的package
    brew upgrade

    // 清除Homebrew缓存
    brew cleanup

    // 安装ruby
    brew install ruby

    // 查看可清理的旧版本,不执行实际操作
    brew cleanup -n

    // 清除ruby 旧版本
    brew cleanup ruby

    // 安装过后查看ruby版本未改变
    echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile
    source ~/.bash_profile

    @HLFdeMacBook-Pro  ~  flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 3.13.8, on macOS 13.6 22G120 darwin-x64, locale zh-Hans-CN)
    [!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    ✗ 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.0.1)
    ✗ Unable to get list of installed Simulator runtimes.
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 2022.3)
    [✓] VS Code (version 1.78.1)
    [✓] Connected device (2 available)
    [✓] Network resources

Unable to get list of installed Simulator runtimes.

  • Xcode中启动下载ios设备

    @HLFdeMacBook-Pro  ~  flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 3.13.8, on macOS 13.6 22G120 darwin-x64, locale zh-Hans-CN)
    [!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    ✗ 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.0.1)
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 2022.3)
    [✓] VS Code (version 1.78.1)
    [✓] Connected device (3 available)
    [✓] Network resources

!\] Android toolchain - develop for Android devices (Android SDK version 28.0.3) ✗ cmdline-tools component is missing Run `path/to/sdkmanager --install "cmdline-tools;latest"` See [https://developer.android.com/studio/command-line](https://developer.android.com/studio/command-line "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 [macOS install \| Flutter](https://flutter.dev/docs/get-started/install/macos#android-setup "macOS install | Flutter") for more details. * 在android studio 中选则 Android SDK → SDK Tooks → 安装 Android SDK Command-line Tools(latest) @HLFdeMacBook-Pro  ~  flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.13.8, on macOS 13.6 22G120 darwin-x64, locale zh-Hans-CN) [!] Android toolchain - develop for Android devices (Android SDK version 28.0.3) ✗ Flutter requires Android SDK 29 and the Android BuildTools 28.0.3 To update the Android SDK visit for detailed instructions. [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] VS Code (version 1.78.1) [✓] Connected device (2 available) [✓] Network resources ! Doctor found issues in 1 category. \[!\] Android toolchain - develop for Android devices (Android SDK version 28.0.3) ✗ Flutter requires Android SDK 29 and the Android BuildTools 28.0.3 To update the Android SDK visit [macOS install \| Flutter](https://flutter.dev/docs/get-started/install/macos#android-setup "macOS install | Flutter") for detailed instructions. * Android Studio -\> SDK Manager -\> SDK Platforms tab -\> 选择 Android 10.0 Pie(**SDK 29 对应的是10版本,可能是更高的版本,注意提示要求版本**) 下载并安装 * Android Studio -\> SDK Manager -\> SDK Tools tab -\> 选择右下角 Show Package Details -\> 在 Android SDK Build-Tools 里选择 28.0.3 下载并安装 ![Untitled](https://file.jishuzhan.net/article/1718494960795258882/34a36df685abd11ce633b01dfd1fa850.webp) @HLFdeMacBook-Pro  ~  flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.13.8, on macOS 13.6 22G120 darwin-x64, locale zh-Hans-CN) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] VS Code (version 1.78.1) [✓] Connected device (2 available) [✓] Network resources

相关推荐
消失的旧时光-194312 小时前
iFlutter --> Flutter 开发者 的 IntelliJ IDEA / Android Studio 插件
flutter·android studio·intellij-idea
马拉萨的春天16 小时前
block的样式有哪些?如果copy的话分别会有啥样式
flutter·性能优化·ios的block
Rattenking17 小时前
【CSS】---- 图形函数详解
笔记·学习·flutter
程序员老刘17 小时前
别再抱怨Flutter方案太多了,这个就叫生态!
flutter·客户端
黄毛火烧雪下19 小时前
(一)Flutter 插件项目demo预览图
flutter
站在远方望童年21 小时前
WSL2 中的 Flutter 开发环境配置
flutter
w_y_fan21 小时前
flutter_native_splash: ^2.4.7
android·前端·flutter
QuantumLeap丶1 天前
《Flutter全栈开发实战指南:从零到高级》- 06 -常用布局组件
flutter·dart
大雷神2 天前
【成长纪实】Flutter中Dart 与Harmony中 ArkTS 异步编程对比:从 Future 到 Promise
flutter·harmonyos
QuantumLeap丶2 天前
《Flutter全栈开发实战指南:从零到高级》- 05 - 基础组件实战:构建登录界面
flutter·ios