Mac 更新Android Studio问题

Tip:

在 Android Studio官网 下载最新稳定版本。官网更改了 Android Studio 的版本编号系统,以与IntelliJ IDEA(Android Studio 所基于的 IDE )更加一致。

在之前的编号系统中,此版本的编号为 Android Studio 4.3 或版本4.3.0.1 。有了新的编号系统,现在是Android Studio - Arctic Fox | 2020.3.1 2020.3.1 版本。

New version numbering

Updated version numbering for Android Studio

We have changed the version numbering system for Android Studio to more closely align with IntelliJ IDEA, the IDE that Android Studio is based on.

In the previous numbering system, this release would have been numbered as Android Studio 4.3 or version 4.3.0.1. With the new numbering system, it is now Android Studio - Arctic Fox | 2020.3.1, or version 2020.3.1.

Android Studio 2020.3.1.png

Going forward, here’s how the Android Studio version number is determined:

...

  • The first two number groups represent the version of the IntellIj platform that a particular Android Studio release is based on. For this release, it's version 2020.3.
  • The third number group represents the Studio major version, starting at 1 and incrementing by one for every major release.
  • The fourth number group represents the Studio minor/patch version, starting at 1 and incrementing by one for every minor release.
  • We are also giving each major release a version name, incrementing from A to Z based on animal names. This release is named Arctic Fox.

Updated version numbering for Android Gradle plugin

We have changed the version numbering for Android Gradle plugin (AGP) to more closely match the underlying Gradle build tool. Therefore, AGP 7.0 is the next release after AGP 4.2.

For more details, see Versioning changes in the AGP release notes.

安装Android Studio后,在终端Terminal或者iTerm输入flutter doctor进行检查。

问题:cmdline-tools component is missing

iTerm.png
➜  ~ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.1, on macOS 11.4 20F71 darwin-x64, locale
    zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 30.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
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.60.2)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.

解决:

根据报错提示信息

    ✗ 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.

进入Android Studio添加SDK Tool对应所缺工具。可以去Android Studio找到Preferences -> Android SDK 找到SDK Tool或者在

SDK Manager.png

SDK Tool.png
Android SDK Command-line Tools.png

勾选Android SDK Command-line Tools(latest)点击一路OK下载完毕即可。
再次在终端Terminal或者iTerm输入flutter doctor进行检查。

flutter doctor.png

ok

你可能感兴趣的:(Mac 更新Android Studio问题)