Ubuntu系统下如何通过命令行启动Android SDK Manager GUI
Hey there! I’ve dealt with this exact headache before when setting up the Android SDK without Android Studio—totally get how confusing it can be when the docs don’t spell out the GUI launch steps clearly. Let me break down how to get that SDK Manager GUI up and running based on your operating system:
First, make sure you know the root path of your installed Android SDK (let’s call this ANDROID_SDK_ROOT for reference; setting it as an environment variable will make things easier long-term).
Windows
- Quick double-click method: If you’re using an older SDK version, look for
SDK Manager.exedirectly in your SDK root folder—double-click it, and the GUI will pop right up. - Command line approach: Open Command Prompt or PowerShell, navigate to the
cmdline-tools\latest\binfolder inside your SDK root, then run:
If yoursdkmanager --guicmdline-toolsfolder uses a specific version number instead oflatest(like6.0), just replace that part in the path. If you haven’t set theANDROID_SDK_ROOTvariable, you can specify the path directly:sdkmanager --gui --sdk_root=C:\your\actual\sdk\path
macOS/Linux
- Open your terminal, navigate to the
cmdline-tools/latest/bindirectory in your SDK root, then run:
Again, replace./sdkmanager --guilatestwith your actual cmdline-tools version if needed. If the command throws an error about the SDK path, add the root path explicitly:./sdkmanager --gui --sdk_root=/your/actual/sdk/path
A note for older SDK versions
If you’re working with an SDK older than Android 10, the GUI might be in the tools folder instead. For Windows, run android.bat; for macOS/Linux, run ./android.sh from the tools directory. Keep in mind this old tool is deprecated by Google, so upgrading to use the cmdline-tools method is better if you can.
内容的提问来源于stack exchange,提问作者shamon shamsudeen

