简体   繁体   English

通过Android SDK管理器下载SDK速度慢

[英]Slow SDK download through Android SDK manager

When I run Android SDK manager to download SDK platform, the download speed is 8 KiB/s. 当我运行Android SDK管理器下载SDK平台时,下载速度为8 KiB / s。 It would take more than 2 hours to download one platform like Android 2.2, API 8. There is no problem with download stuff through browser. 下载Android 2.2,API 8等平台需要2个多小时。通过浏览器下载内容没有问题。 Does anyone know how to fix this problem? 有谁知道如何解决这个问题?

I have not experienced this issue. 我没有遇到过这个问题。 Force or unforce HTTPS (there is an option for this under Settings), and see if this improves the quality of your connection. 强制或取消强制HTTPS(在“设置”下有一个选项),看看这是否会提高连接质量。

I also have this problems and found a solution online and it looks like it working for now. 我也有这个问题,并在网上找到了一个解决方案,它看起来像现在一样。 I tried with forcing HTTP AND HTTPS and nothing really work. 我尝试强制HTTP和HTTPS,没有任何真正的工作。

So try this: 试试这个:

1.) Run command prompt as an administator - Windows 7 (Start->Right click on Command Prompt-> Choose "Run as Administrator") or "Start" enter CMD into search box and then right click and "Run as administrator". 1.)以管理员身份运行命令提示符 - Windows 7(开始 - >右键单击命令提示符 - >选择“以管理员身份运行”)或“开始”在搜索框中输入CMD,然后右键单击“以管理员身份运行”。

2.) In Command Prompt window enter: 2.)在命令提示符窗口中输入:

netsh

and press ENTER 然后按ENTER键

3.) Then write this and hit ENTER at the end: 3.)然后写下这个并在结尾处按Enter:

interface tcp set global autotuning=disabled

4.) Now restart your SDK manager and try to download again! 4.)现在重新启动SDK管理器并尝试再次下载!


Before doing the above, Take note of your original value in case you want to revert back: 执行上述操作之前 ,请记下您的原始值以防您想要恢复原状

interface tcp show global

Try disabling antivirus and enabling Force https://... sources to be fetched using http://... in Android SDK Manager's Tools-> Options... . 尝试禁用防病毒并在Android SDK管理器的Tools-> Options... Force https://... sources to be fetched using http://...

This helped me. 这对我有帮助。

取消选中https框对我有用。

Check those XML file links 检查那些XML文件链接 检查那些Xml文件链接

Let me pen them down here... 让我在这里写下来......

Google Repository for SDK's Of all Android API 适用于所有Android API的SDK的Google Repository

Google Repository for Add-on's (Google API's) for all Android API 所有Android API的附加组件(Google API)的Google Repository

Intel API's for Android 适用于Android的英特尔API

Google repository for system Images 用于系统映像的Google存储库

MIPS repository for system images 系统映像的MIPS存储库

Intel repository for system images 英特尔系统映像存储库

Now you will know what you must be looking out for.... 现在你会知道你必须要注意什么......

Take an example of this snapshot 举一个这个快照的例子 说我想下载谷歌API for Android API12

Say i want to download google API for Android API12 说我想下载谷歌API for Android API12

then Google Repository for Add-on's (Google API's) for all Android API Lookup for <sdk:url> tag under <sdk:addon> tag as given in the example below 然后在<sdk:addon>标记下的<sdk:addon> <sdk:url>标记的所有Android API查找的Google存储库加载项(Google API),如下例所示

查找sdk:url标记

and then use the link used to obtain the XML file 然后使用用于获取XML文件的链接

Strip off the last part and replace it with the <sdk:url> tag content 剥离最后一部分并将其替换为<sdk:url>标记内容

for eg: in this case it would be like 例如:在这种情况下它会是这样的

Google API for Android API 12 (HoneyComb) Google API for Android API 12(HoneyComb)

there you have a download link.... 你有下载链接....

Similarly SDK's ,System-images can be downloaded.... 类似SDK,系统图像可以下载....

Dont have to wait for ages to complete that list ;) for you download to get accelerated use DAP or IDM ( download accelerators ) 不必等待多年才能完成该列表;)为您下载加速使用DAP或IDM(下载加速器)

Enjoy! 请享用! :) :)

You can manually download and install Android SDK Component. 您可以手动下载并安装Android SDK组件。

Method: 方法:

STEP 1 - Go to android SDK installation folder("C:\\Users\\%username%\\Appdata\\Local\\Android\\android-SDK" or any other location you choose during installation) then open android SDK manager 第1步 - 转到android SDK安装文件夹(“C:\\ Users \\%username%\\ Appdata \\ Local \\ Android \\ android-SDK”或您在安装过程中选择的任何其他位置)然后打开android SDK manager 在此输入图像描述 STEP 2 - Check the Component you want to download 第2步 - 检查要下载的组件 在此输入图像描述 STEP 3 - Then click on install 1 package 第3步 - 然后单击安装1包 在此输入图像描述 在此输入图像描述 STEP 4 - Click on stop button 第4步 - 单击停止按钮 在此输入图像描述 STEP 5 - Navigate to android SDK installation folder then go to temp ("C:\\Users\\%username%\\AppData\\Local\\Android\\android-sdk\\temp") folder here you will see two files are created copy the name of the set up information file 步骤5 - 导航到android SDK安装文件夹然后转到temp(“C:\\ Users \\%username%\\ AppData \\ Local \\ Android \\ android-sdk \\ temp”)文件夹,在这里你会看到两个文件被创建复制名称设置信息文件 在此输入图像描述 STEP 6 - goto web browser and type url https://dl.google.com/android/repository/(file name you copied) in my case https://dl.google.com/android/repository/android-23_r01.zip 第6步 - 转到网页浏览器并在我的案例中输入网址https://dl.google.com/android/repository/(您复制的文件名) https://dl.google.com/android/repository/android-23_r01。压缩 在此输入图像描述 STEP 7 - A file will be downloaded automatically 第7步 - 将自动下载文件 在此输入图像描述 STEP 8 - After download is finished go to "C:\\Users\\%username%\\Appdata\\Local\\Android\\android-sdk\\temp" and delete the two files created there and paste the downloaded file there 步骤8 - 下载完成后转到“C:\\ Users \\%username%\\ Appdata \\ Local \\ Android \\ android-sdk \\ temp”并删除在那里创建的两个文件并将下载的文件粘贴到那里 在此输入图像描述 在此输入图像描述 STEP 9 - Now go to android SDK manager and check the component again and click on install 1 package 第9步 - 现在转到android SDK管理器并再次检查组件,然后单击install 1 package 在此输入图像描述 STEP 10 - The package will be installed automatically 第10步 - 将自动安装包 在此输入图像描述 在此输入图像描述

After working on this for weeks and trying all the above plus other suggestions around the web, I came up with the following solution: 经过几周的努力并尝试上述所有内容以及网络上的其他建议后,我想出了以下解决方案:

1) Remove PC Tools Firewall Plus 1)删除PC Tools Firewall Plus

2) Remove AVG free antivirus 2)删除AVG免费杀毒软件

3) Install Comodo Internet Security Free. 3)免费安装Comodo Internet Security。

The files are downloading and installing fine now. 文件现在正在下载和安装。 I'm also using HTTP mode as suggested. 我也按照建议使用HTTP模式。 If you have any of the above security tools I recommend giving this a try. 如果您有上述任何安全工具,我建议您尝试一下。 BTW, turning off PC Tools will not be enough. 顺便说一句,关闭PC Tools是不够的。

None of the other solutions listed here resolved the issue for me, not even uninstalling Android Studio/SDK and then reinstalling them. 此处列出的其他解决方案都没有为我解决问题,甚至没有卸载Android Studio / SDK然后重新安装它们。 It's worth noting that the standalone SDK Manager has also been deprecated since a lot of these answers were posted. 值得注意的是,由于发布了大量这些答案,因此独立SDK Manager也已被弃用

After hours of troubleshooting, I managed to resolve the issue by renaming my Android Studio config folder ( ~/.AndroidStudio2.3 ) to something else and making Android Studio create it again. 经过数小时的故障排除后,我设法通过将我的Android Studio配置文件夹( ~/.AndroidStudio2.3 )重命名为其他内容并让Android Studio再次创建它来解决此问题。 You can ask Android Studio to import your old config and it still works, so it's likely something to do with the system folder. 您可以要求Android Studio导入旧config ,但它仍然有效,因此可能与system文件夹有关。

Hope this helps anyone else that is having this issue but was unable to find a solution like myself. 希望这有助于其他任何有此问题但无法找到像我这样的解决方案的人。

I had the same problem plus google don't allow me to access andriod, and I must connect with a VPN. 我有同样的问题加上谷歌不允许我访问andriod,我必须连接到VPN。 so I download all xmls and package that I need to my localhost and set dl-ssl.google.com too 127.0.0.1 and then I install them from my local with extra speed :D 所以我将我需要的所有xmls和包下载到我的localhost并将dl-ssl.google.com设置为127.0.0.1然后我以更快的速度从我的本地安装它们:D

I also have this problems and found a solution online and it looks like it working for now. 我也有这个问题,并在网上找到了一个解决方案,它看起来像现在一样。 I tried with forcing HTTP AND HTTPS and nothing really work. 我尝试强制HTTP和HTTPS,没有任何真正的工作。

So try this: 试试这个:

1.) Run command prompt as an administator - Windows 7 (Start->Right click on Command Prompt-> Choose "Run as Administrator") or "Start" enter CMD into search box and then right click and "Run as administrator". 1.)以管理员身份运行命令提示符 - Windows 7(开始 - >右键单击命令提示符 - >选择“以管理员身份运行”)或“开始”在搜索框中输入CMD,然后右键单击“以管理员身份运行”。

2.) In Command Prompt window enter (everything without quotes): 'netsh' and press ENTER 2.)在命令提示符窗口中输入(没有引号的所有内容):'netsh'并按ENTER键

3.) Then write this and hit ENTER at the end: interface tcp set global autotuning=disabled 3.)然后写这个并在结尾处按Enter:interface tcp set global autotuning = disabled

4.) Now restart your SDK manager and try to download again! 4.)现在重新启动SDK管理器并尝试再次下载!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM