cmdline-tools:无法确定 SDK 根 [英] cmdline-tools : could not determine SDK root
问题描述
C:\Android\sdk\bin>sdkmanager错误:无法确定 SDK 根.错误:要么使用 --sdk_root= 明确指定它,要么将此包移动到其预期位置:\cmdline-tools\latest\
C:\Android\sdk\bin>sdkmanager Error: Could not determine SDK root. Error: Either specify it explicitly with --sdk_root= or move this package into its expected location: \cmdline-tools\latest\
它显示为这样,即使在 env 变量中指定了根之后.ANDROID_SDK_ROOT C:\Android\sdk
it shows like this, even after specifying the root in env variables. ANDROID_SDK_ROOT C:\Android\sdk
我使用的是 windows 10 64 位机器,我想在没有 android studio 的情况下运行 flutter,所以按照此页面上的说明操作 https://medium.com/@quicky316/install-flutter-sdk-on-windows-without-android-studio-102fdf567ce4>
I am using windows 10 64 bit machine, I want to run flutter without android studio so followed instruction on this page https://medium.com/@quicky316/install-flutter-sdk-on-windows-without-android-studio-102fdf567ce4
推荐答案
自新更新以来,文档中未提及一些更改.解压命令行工具包后,您将获得的最顶层目录是 cmdline-tools.将解压后的目录从cmdline-tools重命名为tools,放在$C:/Android/cmdline-tools
Since new updates, there are some changes that are not mentioned in the documentation. After unzipping the command line tools package, the top-most directory you'll get is cmdline-tools. Rename the unpacked directory from cmdline-tools to tools, and place it under $C:/Android/cmdline-tools
现在看起来像$C:/Android/cmdline-tools/tools
now it will look like $C:/Android/cmdline-tools/tools
它会完美运行.
这篇关于cmdline-tools:无法确定 SDK 根的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!