在 Android Studio 上下载 API 21:SDK 管理器不起作用 [英] Download API 21 on Android Studio : SDK Manager doesn't work

查看:59
本文介绍了在 Android Studio 上下载 API 21:SDK 管理器不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Android Studio 上开发了一个项目.该项目基于 API 21,但我下载了 API 22.

I develop a project on Android Studio. This project is based on the API 21, but i have download a API 22.

所以,我尝试使用 SDK Manager 下载 api 21,但我有一些这样的错误:

So, i try to download the api 21 with SDK Manager, but i have some errors like this :

无法获取 URL http://dl.google.com/android/repository/repository-10.xml,原因:Socket Permission denied:connect

Failed to fetch URL http://dl.google.com/android/repository/repository-10.xml, reason: Socket Permission denied: connect

已经尝试过:

  • 转到http://dl.google.com/android/repository/ 下载sources-22_r01.zip,解压D:\LOGICIEL\AndroidSDKLocation\sources\android-21中的.zip然后,SDK Manager 刚刚找到API 21 的源代码",但我无法使用 SDK 21 配置我的模拟器.

  • go to http://dl.google.com/android/repository/ and download sources-22_r01.zip, and dezip the .zip in D:\LOGICIEL\AndroidSDKLocation\sources\android-21 Then, SDK Manager just found 'source for API 21', but i can't configure my emulator with SDK 21.

启动管理员

禁用我的防火墙/卡巴斯基

disable my firewall / Kaspersky

过去,我有一个代理设置.也许某处还有一些设置?已经检查 studio.exe.vmoptions 和 studio64.exe.vmoptions :nothing

in the past, i have a proxy settings. Maybe there are still some settings somewhere ? Already chek in studio.exe.vmoptions and studio64.exe.vmoptions :nothing

尝试在选项 SDK 中强制使用 https

try to force https in option SDK

在android studio中设置无代理"

set "no proxy" in android studio"

当我尝试在 Android Studio 中下载/更新时,是否有任何日志可以找到错误?

is there any log where i can find a error when i try to download/update in Android Studio ?

非常感谢阅读.我希望你会帮助我:)

Thanks a lot for reading. I hape you will help me :)

推荐答案

我遇到了 Android SDK 管理器的代理问题.您可以尝试以下操作.

I had a proxy issue with Android SDK Manager. You could try the following.

搜索文件:

C:\Users\<USERNAME>\.android\androidtool.cfg

里面你必须添加

-Djava.net.useSystemProxies=true
System.setProperty("java.net.useSystemProxies", "true");

此外,您必须在给定的设置中填写您的代理:

In addition you have to fill in your proxy into the given settings:

http.proxyPort=<your Proxy Port>
http.proxyHost=<your Proxy URL / IP>

我不知道为什么后者是必要的.但之后您的 Android SDK 管理器应该能够连接到互联网并且管理器会要求您提供凭据.

I have no clue why the latter is necessary. But after that your Android SDK Manager should be able to connect to the internet and the manager will ask for your credentials.

这篇关于在 Android Studio 上下载 API 21:SDK 管理器不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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