如何在Linux Ubuntu 16.04上安装SDK Manager? [英] How to install SDK manager on linux ubuntu 16.04?

查看:790
本文介绍了如何在Linux Ubuntu 16.04上安装SDK Manager?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图从链接SDK命令行工具的帮助下安装 Android SDK .com/android/repository/sdk-tools-linux-3859397.zip"rel =" noreferrer> https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip 在我的Linux Ubuntu 16.04 PC上.

I was trying to install Android SDK with the help of the SDK command line tools downloaded from the link https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip on my Linux Ubuntu 16.04 PC.

我在安装后运行以下命令

i run the command following command for installation

./android更新sdk

但安装已停止,并在终端上显示了以下消息 ----------------------------------------------------------------------------------------------------------------------------------------

but the installation has stopped and gave the following message on terminal ------------------------------------------------------------------------------------------------------------------------------------

"android"不推荐使用该命令.有关手动SDK,AVD和项目管理的信息,请使用Android Studio.对于命令行工具,请使用tools/bin/sdkmanager和tools/bin/avdmanager

The "android" command is deprecated. For manual SDK, AVD, and project management, please use Android Studio. For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager

"android"可以尽最大努力将SDK命令转换为sdkmanager命令.继续?(可以使用--use-sdk-wrapper命令行参数或通过设置USE_SDK_WRAPPER环境变量来取消显示此提示)[y/N]:y

"android" SDK commands can be translated to sdkmanager commands on a best-effort basis. Continue? (This prompt can be suppressed with the--use-sdk-wrapper command-line argument or by setting the USE_SDK_WRAPPER environment variable) [y/N]: y

运行/home/user/Android/Sdk/bin/sdkmanager --update

Running /home/user/Android/Sdk/bin/sdkmanager --update

警告:java.net.SocketException:连接重置

警告:无法下载任何源列表!

完成

-----------------------------------------------------------------------------------------------------------------------------------

如何解决此错误.或者建议我在不安装android studio的情况下在我的linux PC上安装android sdk的方法.

how to solve this error.or suggest me a way to install android sdk on my linux pc without installing android studio.

推荐答案

有点晚,但情况相同.看起来这不是一个错误,而是工具的发展方式:如果用户想要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.

这篇关于如何在Linux Ubuntu 16.04上安装SDK Manager?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆