下载Android SDK组件以进行离线安装 [英] Download the Android SDK components for offline install

查看:879
本文介绍了下载Android SDK组件以进行离线安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在不使用SDK管理器的情况下下载Android SDK组件以进行离线安装? 问题是我在无法控制的防火墙后面,并且两个站点的下载URL似乎都被阻止了(引发了连接被拒绝的异常)

Is it possible to download the Android SDK components for offline install without using the SDK Manager? The problem is I am behind a firewall which I have no control over and both sites download URLs seem to be blocked (throws a connection refused exception)

https://dl-ssl.google.com/android/repository/repository.xml

http://dl-ssl.google.com/android/repository/repository.xml

Failed to fetch URL http://dl-ssl.google.com/android/repository/repository.xml, reason: Connection refused: connect

推荐答案

要安装android组件,请执行以下步骤

To install android component do following steps

  • 在离线计算机上运行android sdk管理器
  • 单击显示/隐藏日志窗口
  • 在这里,您会找到所有可用软件包的xml文件列表

获取 https://dl-ssl.google.com/android/repository/addons_list-2.xml
成功获取加载项列表
提取网址: https://dl-ssl.google.com/android/repository/repository-7.xml
验证XML: https://dl-ssl.google.com/android/repository/repository-7.xml
解析XML: https://dl-ssl.google.com/android/repository/repository-7.xml

Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml
Fetched Add-ons List successfully
Fetching URL: https://dl-ssl.google.com/android/repository/repository-7.xml
Validate XML: https://dl-ssl.google.com/android/repository/repository-7.xml
Parse XML: https://dl-ssl.google.com/android/repository/repository-7.xml

https://dl-ssl.google.com/android/repository/addons_list-2.xml 是主要的xml文件,所有其他软件包列表均在其中.

https://dl-ssl.google.com/android/repository/addons_list-2.xml is main xml file where all other package list is available.

让我们说您要下载api-9平台,并且它在版本库7上可用,那么您必须执行以下步骤

lets say you want to download platform api-9 and it is available on repository-7 then you have to do following steps

  • 记下存储库地址,然后转到具有互联网连接的任何其他计算机,并在任何浏览器中键入以下链接

  • note the repository address and go to any other machine which has internet connection and type following link in any browser

https://dl-ssl.google.com/android/repository/repository-7.xml

在要下载的api版本下搜索<sdk:url>**android-2.3.1_r02-linux.zip**</sdk:url>.这是您必须下载的文件名.要下载此文件,您必须在任何下载器或浏览器中键入以下URI,它将开始下载文件.

Search for <sdk:url>**android-2.3.1_r02-linux.zip**</sdk:url> under the api version which you want to download. This is the file name which you have to download. to download this file you have to type following URI in any downloader or browser and it will start download the file.

http://dl-ssl.google. com/android/repository/android-2.3.3_r02-linux.zip

任何文件的一般规则都用包名称替换android-2.3.3_r02-linux.zip

General rule for any file replace android-2.3.3_r02-linux.zip with your package name

下载完成后,将下载的ZIP(或其他OS的其他格式)文件粘贴到闪存/笔驱动器中,然后将zip文件粘贴到<android sdk dir>/temp(例如:-c:\android-sdk\temp)文件夹/目录中在您的离线计算机中.

Once the download is complete,paste downloaded ZIP(or other format for other os) file in your flash/pen drive and paste the zip file at <android sdk dir>/temp (ex:- c:\android-sdk\temp) folder/directory in your offline machine.

现在启动SDK管理器,然后选择要在temp中粘贴的程序包,然后单击安装程序包"按钮.您的软件包已安装.

Now start the SDK manager and select the package which you have paste in temp and click Install package button. Your package has been installed.

重新启动日食和AVD管理器以获取新软件包.

Restart your eclipse and AVD manager to get new packages.

注意:-如果要下载sdk-tools或sdk platform-tools,请选择离线计算机(windows/Linux/Mac)上的OS软件包.

这篇关于下载Android SDK组件以进行离线安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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