Linux下Android构建环境报错 cmdlinetools : could not determine SDK root

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\

it shows like this, even after specifying the root in env variables. ANDROID_SDK_ROOT C:\Android\sdk

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

 解决方案:

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

now it will look like $C:/Android/cmdline-tools/tools

and it will work perfectly.

 
原文地址:https://www.cnblogs.com/javalinux/p/14580382.html