flutter报错-cmdline-tools component is missing
  8EtBq8C3gFcy 2023年11月13日 19 0


问题描述

使用flutter command line的时候出现如下错误

[√] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.18363.1916], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
X cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[√] Android Studio (version 4.1)
[√] VS Code
[√] VS Code, 64-bit edition (version 1.62.0)
[√] Connected device (2 available)

主要是配置的Android SDK环境未安装命令行工具

解决方案

打开Android Studio -> File -> Settings -> System Settings -> Android SDK

flutter报错-cmdline-tools component is missing_android

再次运行 flutter doctor 不报错,出现以下画面

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.18363.1916], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1)
[√] VS Code
[√] VS Code, 64-bit edition (version 1.62.0)
[√] Connected device (2 available)

• No issues found!



【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月13日 0

暂无评论

推荐阅读
  iD7FikcuyaVi   2023年11月30日   14   0   0 MacWindowsandroid
  b1UHV4WKBb2S   2023年11月13日   21   0   0 裁剪ideflutter
  b1UHV4WKBb2S   2023年11月13日   15   0   0 flutterDart
8EtBq8C3gFcy