Flutter Doctor错误-找不到Android sdkmanager工具.视窗 [英] Flutter doctor error - Android sdkmanager tool not found. Windows
问题描述
我一直在绕着这个问题走来走去,有太多人遇到与我相似相似的问题,但没有一个是相同的.我正在尝试完全解决问题,但无法解决其中一个问题.
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 以获得详细说明.
Android sdkmanager tool not found (C:\Users\%username%\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.
是的,在我的SDK文件夹中没有"tools"文件夹.我到底该如何解决!我已经安装了所有SDK工具,甚至是NDK(不是由NDK来完成的),我都尝试过创建一个工具文件夹并从构建工具中复制sdkManager.bat(包括bin文件夹),但这只是告诉我更新我的sdkmanager,尝试时会失败.
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 sdkmanager, which when attempted just fails.
看起来一切仍然正常,这让我有点不舒服.
It looks like everything still works, it just makes me a little uncomfortable having that issue there.
非常感谢您的帮助.
推荐答案
我遇到了与您相同的问题.我要做的是(至少到目前为止):
I encounter the same issue as yours. What I do is to (at least for now...):
- 卸载Android Studio 3.6或3.6.1
- 在C:\ Users {您的用户名} \ AppData \ Local \ Android \ Sdk上删除整个Android SDK目录
- 安装Android Studio 3.5.3 .您可以在这里找到它( https://developer.android.com/studio/archive )再次运行工作室.不要导入3.6的设置,并在出现提示时将其删除.
- 再次通过Android Studio欢迎向导",使用标准选项.
- 安装后,您将看到"tools"文件夹存在.
- 您将需要安装dart插件,然后在Android Studio中的配置"->"SDK管理器"->插件"中再次弹出.
- uninstall Android Studio 3.6 or 3.6.1
- delete the whole Android SDK directory at C:\Users{your_user_name}\AppData\Local\Android\Sdk
- install Android Studio 3.5.3. You can find it here(https://developer.android.com/studio/archive) Run the studio again. Do not import the setting of 3.6, and delete them when prompted.
- go through the Android Studio "Welcome Wizard" again, use standard option.
- after the installation, you will see that the "tools" folder exists.
- you will need to install the plugins for dart and flutter again in "Configure"-->"SDK Manager"-->"plugins" within in Android Studio.
这篇关于Flutter Doctor错误-找不到Android sdkmanager工具.视窗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!