Android sdk 下载/更新失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2882425/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android sdk download/update failing
提问by tad604
I'm trying to update and install the latest Android SDK (API 8) and keep getting the following error:
我正在尝试更新和安装最新的 Android SDK (API 8) 并不断收到以下错误:
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
无法获取 URL https://dl-ssl.google.com/android/repository/repository.xml,原因:sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到到请求目标的有效认证路径
I'm running on OS X 10.6.3 If I visit the url in a browser I'm not getting any errors about an untrusted cert.
我在 OS X 10.6.3 上运行 如果我在浏览器中访问 url,我不会收到任何关于不受信任证书的错误。
edit: I'm running Revision 5 of the Android SDK and AVD manager (if that makes a difference) edit: Tried downloading the latest android sdk (revision 6) and running everything from the command line and still no dice. I can only assume there's something either in my java installation or in os x on my machine.
编辑:我正在运行 Android SDK 和 AVD 管理器的修订版 5(如果这有所不同) 编辑:尝试下载最新的 android sdk(修订版 6)并从命令行运行所有内容,但仍然没有骰子。我只能假设在我的 java 安装或我的机器上的 os x 中有一些东西。
回答by Ovi Tisler
Try go to settings inside /tools/android and uncheck the "force https..."
尝试转到 /tools/android 中的设置并取消选中“强制 https...”
回答by Vivek Tiwari
Resolved this issue in windows xp, open your android SDK manager you will find Android sdk tools checkbox underneath Tools checkbox.Select and update your Android sdk tool then you will not get this error again and now you can download api 8 for android 2.2
在 windows xp 中解决了这个问题,打开你的 android SDK 管理器,你会在工具复选框下面找到 Android sdk 工具复选框。选择并更新你的 Android sdk 工具,然后你不会再收到这个错误,现在你可以下载 api 8 for android 2.2
回答by tad604
Ok this worked for me so far (although it makes me nervous that I'll have future problems) I downloaded the bundles straight from the site: http://dl.google.com/android/repository/google_apis-8_r01.ziphttp://dl.google.com/android/repository/android-2.2_r01-macosx.zip
好的,到目前为止,这对我有用(尽管这让我担心将来会遇到问题)我直接从网站下载了这些包:http: //dl.google.com/android/repository/google_apis-8_r01.zip http ://dl.google.com/android/repository/android-2.2_r01-macosx.zip
unzipped them and put the first one under the add-ons folder (where I had installed the android sdk ../android-sdk-mac_86/add-ons/google_apis-8_r01) unzipped the second one and created the directory android-8 underneath ../android-sdk-mac_86/platforms Taking the contents of the zip file and moving it into that directory (the first zip created an appropriately named directory, this one did not).
解压缩它们并将第一个放在 add-ons 文件夹下(我在那里安装了 android sdk ../android-sdk-mac_86/add-ons/google_apis-8_r01)解压第二个并在下面创建目录 android-8 ../android-sdk-mac_86/platforms 获取 zip 文件的内容并将其移动到该目录中(第一个 zip 创建了一个适当命名的目录,这个没有)。
Now it shows up as installed. Still wish I understood what the root problem is/was as I can't update any installed packages with out coming across the same initial error.
现在它显示为已安装。仍然希望我了解根本问题是/曾经是什么,因为我无法更新任何已安装的软件包而不会遇到相同的初始错误。
回答by MikeL
I had the same problem and I tried following Ovi Tisler's solution but the force https option was already deselected and nothing worked.
我遇到了同样的问题,我尝试遵循 Ovi Tisler 的解决方案,但强制 https 选项已被取消选择并且没有任何效果。
Solution:
解决方案:
I solved my my problem by updating the Android SDK tools and Android SDK android tools in the tools folder first. (Do not forget to checked for updates in Help->Check for updates after the installation). After that the SDK platform was listed along other API levels I did not have.
我通过首先更新工具文件夹中的 Android SDK 工具和 Android SDK android 工具解决了我的问题。(安装后不要忘记在帮助->检查更新中检查更新)。之后,SDK 平台与我没有的其他 API 级别一起列出。
Hope it helps someone.
希望它可以帮助某人。
回答by Wasif Hamdani
Well, This problem is mainly caused because ADB is unable to connect to the android servers to fetch updates. (If at home try turning off firewall)
嗯,这个问题主要是因为 ADB 无法连接到 android 服务器来获取更新。(如果在家尝试关闭防火墙)
- Goto folder Android SDK where your sdk is placed(in my case"D:/Android SDK/android-sdk-Windows").
- From this folder double click "SDK Manager.exe".
- When Android SDK and AVD Manager window opened then click Settings.
- In Proxy Settings, it will ask for a HTTP Proxy Server and HTTP Proxy Port.
- Enter the IP address and the port number being asked.
- In Misc Tab check "Force https://... "
- Turn off your firewall and temporarily disable your antivirus.
- 转到放置 sdk 的文件夹 Android SDK(在我的情况下为“D:/Android SDK/android-sdk-Windows”)。
- 从此文件夹中双击“SDK Manager.exe”。
- 当 Android SDK 和 AVD 管理器窗口打开时,单击设置。
- 在代理设置中,它会询问 HTTP 代理服务器和 HTTP 代理端口。
- 输入被询问的 IP 地址和端口号。
- 在其他选项卡中选中“强制 https://...”
- 关闭防火墙并暂时禁用防病毒软件。
Hope this will surely work....
希望这肯定会奏效......
回答by user1544900
In windows 7 I have the same issue, and many times android sdk downloads stucks forever. So I started sdk manager as administrator, and deactivated windows firewall, and my virus protection software. When doing that every thing goes fine, I was able to finish my android sdk downloads.
在 Windows 7 中,我遇到了同样的问题,而且很多时候 android sdk 下载永远卡住了。所以我以管理员身份启动了 sdk manager,并停用了 windows 防火墙和我的病毒防护软件。当这样做一切顺利时,我能够完成我的 android sdk 下载。
回答by Arthur
I know you are using a mac, but for anyone who is on Windows and is getting this error then try going to the SDK and AVD Manager via eclipse instead of using the SDK Setup.exe. This can be found under Window > Android SDK and AVD Manager
我知道您使用的是 mac,但对于使用 Windows 并收到此错误的任何人,请尝试通过 Eclipse 访问 SDK 和 AVD 管理器,而不是使用 SDK Setup.exe。这可以在 Window > Android SDK and AVD Manager 下找到
This fixed the problem for me.
这为我解决了问题。
回答by Brodieman
I had the reverse problem, non https and downloads were taking forever at 26KiB/s - It kept locking up using the manager. So I forced HTTPS and all is good now on Windows Vista
我遇到了相反的问题,非 https 和下载总是以 26KiB/s 的速度进行——它一直在使用管理器锁定。所以我强制使用 HTTPS,现在在 Windows Vista 上一切正常
回答by Andy Mason
I agree with user1544900.
我同意 user1544900。
In windows 7, I have to:
在 Windows 7 中,我必须:
Temporarily turn off my windows firewall.
a. (start -> run -> firewall.cpl) b. Turn Windows Firewall on or off (hyperlink in left-hand menu) c. Choose Turn off Public firewall radio button in the lower section.Restart eclipse by right clicking it and choosing the option to "Run as Administrator".
- Start updating SDK.
暂时关闭我的 Windows 防火墙。
一种。(开始 -> 运行 -> firewall.cpl) b. 打开或关闭 Windows 防火墙(左侧菜单中的超链接) c. 在下方选择关闭公共防火墙单选按钮。通过右键单击它并选择“以管理员身份运行”选项重新启动 eclipse。
- 开始更新SDK。
** Don't forget to turn your firewall back on.
** 不要忘记重新打开防火墙。