无法与代理后面的 gradle 同步,站点未被阻止,从浏览器打开 [英] Cannot sync with gradle behind proxy, site is not blocked, opens from browser

查看:20
本文介绍了无法与代理后面的 gradle 同步,站点未被阻止,从浏览器打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用我新安装的 android studio 2.3 打开一个项目(在另一台机器上开发).工作室正在下载 gradle-2.1.2.pom 但抛出以下错误:

I am trying to open a project (developed in a different machine) with my newly installed android studio 2.3. The studio was downloading gradle-2.1.2.pom but threw the following error:

无法获取'https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.2/gradle-2.1.2.pom'.从服务器收到状态代码 403:禁止

Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.2/gradle-2.1.2.pom'. Received status code 403 from server: Forbidden

当我尝试从浏览器打开上面相同的 url 时,它会下载 .pom 文件,这意味着代理没有阻止它.我已经使用代理地址和登录凭据配置了工作室.谁能解释一下为什么 android studio 无法连接到浏览器可以打开的同一站点.

When I try to open the same url above from my browser, it downloads the .pom file, which means the proxy is not blocking it. I have configured the studio with the proxy address and login credentials. Can anyone explain me why is android studio unable to connect to the same site that the browser can open.

注意:我在关于 gradle 代理背后的现有问题中找不到任何关于此的提示,所以这个新问题.

Note: I could not find any hint about this in the existing questions about gradle behind proxy, so this new question.

推荐答案

我找到了答案.解决方案是在Java中将证书添加到站点https://jcenter.bintray.com(遵循此链接 这样做)并重新启动安卓工作室.基本上,该站点必须由 java 运行时信任才能使用 https 进行连接.

I found out the answer. The solution is to add the certificate to the site https://jcenter.bintray.com in Java (follow this link to do so) and restart the android studio. Basically, the site has to be trusted by java runtime for connecting using https.

这篇关于无法与代理后面的 gradle 同步,站点未被阻止,从浏览器打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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