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

查看:201
本文介绍了无法与代理后面的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文件,这意味着代理不会阻止它.我已经为Studio配置了代理地址和登录凭据.谁能解释我为什么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 中(按照此链接),然后重新启动Android Studio.基本上,必须使用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天全站免登陆