flutter doctor -v
1、cmdline-tools component is missing
[✗] Android toolchain - develop for Android devices
• Android SDK at /Users/huchu/Library/Android/sdk
✗ 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 Studio设置, Appearance &Behavior-》System Settings -〉Android SDK -> SDK Tools下载 Android SDK Command-line Tools(latest)
WX20211028-105555@2x.png WX20211028-105624@2x.png WX20211028-105647@2x.png2、Android SDK file not found
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/huchu/Library/Android/sdk
• Platform android-30, build-tools 29.0.3
• ANDROID_HOME = /Users/huchu/Library/Android/sdk
✗ Android SDK file not found: /Users/huchu/Library/Android/sdk/platforms/android-30/android.jar.
• Try re-installing or updating your Android SDK,
visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions.
image.png
再次执行flutter doctor没问题了
image.png
网友评论