且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Linux Ubuntu 16.04上安装SDK Manager?

更新时间:2021-10-09 01:23:51

有点晚,但情况相同.看起来这不是一个错误,而是工具的发展方式:如果用户想要sdk管理器的GUI,他们会敦促用户使用Android Studio,但只能在IDE中使用.

A bit late, but in the same situation. It looks like this isn't an error, but the way the tools evolved: they are pushing users to use Android Studio if they want the GUI for the sdk manager, it's usable only from the IDE.

您可以从下载的该文件夹中的 bin/sdkmanager 中找到命令行,并且可以在

You still have the command line available at bin/sdkmanager in this folder from the download, and instructions can be found here, but they are not great, either, so I'll share what I did:

  1. 此页面(链接向下)下载了最新的压缩文件li>
  2. 解压缩某处(我选择了/opt/Android/android-sdk )
  3. 创建了一个符号链接,将sdkmanager添加到我的路径( ln -s/opt/Android/android-tools/bin/sdkmanager〜/.local/bin/sdkmanager )
  4. 使用 sdkmanager"platform-tools""platforms; android-19""build-tools; 19.1.0" (可能需要sudo)为kitkat和更高版本安装平台工具和构建工具./li>
  1. downloaded the latest compressed file from this page (link way down there)
  2. unzipped somewhere (I chose /opt/Android/android-sdk)
  3. created a symlink to add sdkmanager to my path (ln -s /opt/Android/android-tools/bin/sdkmanager ~/.local/bin/sdkmanager)
  4. installed platform tools and build tools for kitkat and up using sdkmanager "platform-tools" "platforms;android-19" "build-tools;19.1.0" (sudo may be needed)

您可以使用 sdkmanager --list 检查可用的版本,并确定支持和下载其他版本工具所需的内容.下载不会显示任何进度,只会告诉您一段时间后完成.

You can check the versions available using sdkmanager --list, and figure what you need to support and download tools for other versions. The download will not show any kind of progress, it'll only tell you it's done after a while.

我认为仅安装Android Studio来访问sdk管理器GUI并不是什么大问题,但是我将使用命令行工具.这对Google非常不利,特别是对于那些不真正了解被入侵的Intellij版本的人.

I suppose it's not a big deal to keep Android Studio installed solely to have access to the sdk manager GUI, but I'll make do with the command line tools. That's very shady of Google, specially to people not really into their hacked up Intellij version.