如何在android studio中使用代理连接

问题描述:

我正在尝试在android studio中运行"hello world"应用程序.我的连接是通过代理.当我尝试运行"hello world应用程序"时,android studio向我显示下一个错误:

I'm trying to run a "hello world" application in android studio. My connection is via proxy. When I try run the "hello world app", android studio show me the next error:

运行Prueba时出错:Gradle项目同步失败.请修复您的项目,然后重试.

Error running Prueba: Gradle project sync failed. Please fix your project and try again.

如果我在以下位置进行配置:文件/设置-> HTTP代理",然后将我的代理配置放入下一个,则错误为:

If I configure in: "File/setting -> HTTP Proxy" and next put my proxy configuration, the error is the next:

错误:无法获取'<a href="toggle.offline.mode">Enable Gradle 'offline mode' and sync project</a>

Error:Could not GET 'http://jcenter.bintray.com/com/android/tools/build/gradle/0.12.2/gradle-0.12.2.pom'. Received status code 407 from server: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. ) <a href="toggle.offline.mode">Enable Gradle 'offline mode' and sync project</a>

如何解决该错误?

该错误表明需要代理身份验证.要对您的代理服务器进行身份验证,请返回文件"->设置"->"HTTP代理",选中代理身份验证"框,然后在此处输入您的凭据.另外,单击检查连接按钮以测试您的连接是否成功.

There error indicates that proxy authentication is needed. To authenticate to your proxy server go back to File->Setting->HTTP Proxy, check the box for Proxy authentication and enter your credentials there. Also, click the check connection button to test that your connection is successful.