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

编程入门 行业动态 更新时间:2024-10-25 08:15:37
本文介绍了如何在Linux Ubuntu 16.04上安装SDK Manager?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正试图从链接SDK命令行工具的帮助下安装 Android SDK /android/repository/sdk-tools-linux-3859397.zip"rel =" noreferrer> dl.google/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 dl.google/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.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:

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

    本文发布于:2023-10-29 08:23:36,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1539199.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:如何在   Linux   Ubuntu   Manager   SDK

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!