目录
1. 问题
1.1 Flutter doctor
PS C:\Windows\system32> Flutter doctor
Doctor summary (to see all details, run Flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.18363.720], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
X Android license status unkNown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://Flutter.dev/setup/#android-setup for detailed
instructions.
[√] Android Studio (version 3.6)
[√] Connected device (1 available)
1.2 Flutter doctor --android-licenses
PS C:\Windows\system32> Flutter doctor --android-licenses
Android sdkmanager tool not found (C:\Users\Abc\AppData\Local\Android\sdk\tools\bin\sdkmanager).
Try re-installing or updating your Android SDK,
visit https://Flutter.dev/setup/#android-setup for detailed instructions.
2. 解决
打开C:\Users\Abc\AppData\Local\Android\Sdk
这个目录,发现没有tools
这个文件夹
原因是在新版本中tools
文件夹已经不再使用了,但是仍然可以安装:
打开Tools -> SDK Manager -> SDK Tools , 取消勾选 Hide Obsolete Packages,勾选Android SDK Tools (Obsolete),再点Apply,下载安装
安装完成以后,再Flutter doctor --android-licenses
PS C:\Windows\system32> Flutter doctor --android-licenses
All SDK package licenses accepted.======] 100% Computing updates...
就没问题了。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。