IntelliJ HTTP-Proxy工作但在gradle依赖项中失败 [英] IntelliJ HTTP-Proxy works but fails at gradle dependencies

查看:1281
本文介绍了IntelliJ HTTP-Proxy工作但在gradle依赖项中失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以目前在工作中我面临的问题是,我无法构建使用全局依赖项的项目。我们使用自动配置代理脚本,我已在File-> Settings-> Appearance&行为 - >系统设置 - > HTTP代理并使用检查连接功能进行测试。

so currently at work I face the problem, that I cannot build projects, which use global dependencies. We use an auto-config proxy script, which I already set in the File->Settings->Appearance & Behaviour->System Settings->HTTP Proxy and tested with the Check Connection-function.

检查连接功能适用于任何任意html以及所需的gradle-文件(jcenter.bintray.com/com/android/tools/build/gradle/2.0.0/gradle-2.1.0-javadoc.jar)。

The check connection function is working for any arbitrary html and also for the needed gradle-file (jcenter.bintray.com/com/android/tools/build/gradle/2.0.0/gradle-2.1.0-javadoc.jar).

对于解决方案我已经尝试过:

For solutions I already tried to:


  • 将代理信息设置为gradle.properties

  • 试图设置http和/或https代理设置

  • set the Proxy Information into the gradle.properties
  • tried to set http and/or https proxy settings

* systemProp.http(s).proxyHost=linktoproxyconfig.org  
* systemProp.http(s).proxyPort=xxxx                 
* systemProp.http(s).proxyUser=xxxx            
* systemProp.http(s).proxyPassword=xxxx


  • 更改存储库方向(jcenter()与jcenter {url http://jcenter.bintray.com }

    我知道这个事实,一个人可以工作e,在本地下载gradle。但是为了防止在不同的机器上额外维护gradle版本,我想限制离线工作选项。

    I am aware of the fact, that one can work offline, downloading the gradle locally. But to prevent the additional maintenance of gradle versions on different machines I would like to restrain from the work offline option.

    编辑:也许我还应该添加错误消息:< br>
    Gradle sync失败:连接超时:连接。如果您位于HTTP代理后面,请在IDE或Gradle中配置代理设置。

    Maybe I should also add the error message:
    Gradle sync failed: Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.

    如果有人有,我将非常感激关于解决方案的想法。

    I would be most grateful if someone has an idea about a solution.

    推荐答案

    IntelliJ IDEA 2017.3似乎不尊重下载Gradle的代理选项。因此,将代理选项添加到gradle.properties和gradle-wrapper.properties,然后在终端中运行./gradlew。这将下载Gradle。之后,IntelliJ将工作。

    IntelliJ IDEA 2017.3 does not seem to respect the proxy options for downloading Gradle. So add the proxy options to both gradle.properties and gradle-wrapper.properties, and then run ./gradlew in a terminal. This will download Gradle. After that, IntelliJ will work.

    这篇关于IntelliJ HTTP-Proxy工作但在gradle依赖项中失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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