成功解决Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools

Run the project and the following error message appears when executing flutter doctor :

MacBook-Pro android % flutter doctor        
Doctor summary (to see all details, run flutter doctor -v):
[] Flutter (Channel stable, 3.10.2, on macOS 13.0.1 22A400 darwin-arm64, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    ✗ 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 14.3)
[] Chrome - develop for the web
[] Android Studio (version 2021.3)
[] VS Code (version 1.73.0)
[] Connected device (2 available)
[] Network resources

Solution

1. Install android sdk tools.
Insert image description here
2. After successful installation, click finish.
Insert image description here

Guess you like

Origin blog.csdn.net/m0_48915964/article/details/130948811