本文主要是介绍Flutter - 环境配置提示 cmdline-tools component is missing,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
问题:
flutter doctor
运行命令 flutter doctor
报错:
Android toolchain - develop for Android devices (Android SDK version 30.0.2) ✗ 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 Tools
, 勾选 Android SDK Command-line Tools (latest)
下载完成后:
再执行 flutter doctor
命令:
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
按照提示执行命令:
flutter doctor --android-licenses
一直输入 y
最后:
再执行 flutter doctor
命令,结果 • No issues found!
一切正常了:
这篇关于Flutter - 环境配置提示 cmdline-tools component is missing的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!