问题描述
我一直在绕圈子解决这个问题,有很多人遇到了与我类似的问题,但没有一个是相同的.我正在尝试完全设置颤振,但无法解决其中一个问题.
I have been going round in circles with this issue, there are so many that people have issues similar to mine, but not one of them is the same. I am trying to get flutter fully set up, but can't resolve one of the issues.
当我运行 flutter doctor -v 时,我得到以下输出:
When I run flutter doctor -v I get the following output:
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.657], locale en-GB)
• Flutter version 1.12.13+hotfix.8 at C:\flutter
• Framework revision 0b8abb4724 (3 weeks ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\%username%\AppData\Local\Android\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
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)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 43.0.2
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
[√] VS Code (version 1.42.1)
• VS Code at C:\Users\%username%\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.8.1
[√] Connected device (1 available)
• AOSP on IA Emulator • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
! Doctor found issues in 1 category.
如果我尝试运行命令 flutter doctor --android-licenses 我得到:
And if I try to run the command flutter doctor --android-licenses I get:
未找到 Android sdkmanager 工具(C:\Users%username%\AppData\Local\Android\Sdk\tools\bin\sdkmanager).尝试重新安装或更新您的 Android SDK,请访问https://flutter.dev/setup/#android-setup 了解详细说明.>
没错,没有工具";我的 SDK 文件夹中的文件夹.我到底该怎么解决这个问题!我已经安装了所有的 SDK 工具,甚至 NDK(不是那种颤动的)我已经尝试创建一个工具文件夹并从构建工具复制 sdkManager.bat(包括 bin 文件夹),但这只是告诉我更新我的SDK 管理器,尝试时失败.
And it's right, there is no "tools" folder in my SDK folder. How on earth do I fix that! I have installed all the SDK tools, even the NDK (not that flutter picks that up) I have tried creating a tools folder and copying sdkManager.bat (including the bin folder) from build-tools, but that just tells me to update my SDK manager, which when attempted just fails.
看起来一切正常,只是让我有点不舒服.
It looks like everything still works, it just makes me a little uncomfortable having that issue there.
非常感谢任何帮助.
推荐答案
我刚刚遇到了同样的问题 - 我的解决方案更简单一些:
I have just hit the same issue - my resolution was a little simpler:
和你一样,我安装了Android Studio,关键是安装Android SDK Command-line Tools,步骤是:
Just like you, I have Android Studio installed, the key is to install Android SDK Command-line Tools, steps being:
- 打开 Android Studio
- 工具菜单,SDK 管理器
- 在出现的窗口中有内部面板,选择SDK Tools面板
- 勾选Android SDK 命令行工具
- 选择窗口底部附近的应用按钮
此时,系统将提示您接受 SDK 许可并安装命令行工具.您的许可问题现在应该已经解决了.
At that point, you will be prompted to accept the SDK license and the command line tools will be installed. Your license issue should now be resolved.
仅供参考,命令行工具将在您的 SDK 文件夹中添加一个新文件夹 cmdline-tools
.如果您查看 cmdline-tools/latest/bin,您将看到 sdkmanager - 但您的许可证问题应该已经得到解决.
FYI, the command line tools will add a new folder cmdline-tools
inside your SDK Folder. If you look in there cmdline-tools/latest/bin you will see sdkmanager - but your license issue should already be resolved.
这篇关于Flutter doctor 错误 - 找不到 Android sdkmanager 工具.视窗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!