Gradle installation having a proxy issue

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 12:19:38

For me the issue was the http prefix! If this is your case, remove http/https prefixes!

I had my gradle.properties like this, and was failing:

systemProp.http.proxyHost=http://squid.proxy.com
systemProp.http.proxyPort=8080
systemProp.https.proxyHost=http://squid.proxy.com
systemProp.https.proxyPort=8080

Proper way to set proxy settings for gradle is:

systemProp.http.proxyHost=squid.proxy.com
systemProp.http.proxyPort=8080
systemProp.https.proxyHost=squid.proxy.com
systemProp.https.proxyPort=8080

You have to add the following configuration in gradle.configuration.These are the proxy settings needed to be configured if you are working behind proxy.

Source: (https://docs.gradle.org/current/userguide/build_environment.html#sec:accessing_the_web_via_a_proxy)

And don't add 'http.// or 'https:' in systemProp.http.proxyHost only 'www.host.com' .Also comment out the systemProp.http.proxyUser or proxypassword if you don't need it to login into the proxy.

systemProp.proxySet=true
systemProp.http.keepAlive=true
systemProp.http.proxyHost=www.host.com
systemProp.http.proxyPort=port
systemProp.http.proxyUser=username_ifneeded
systemProp.http.proxyPassword=password_needed
systemProp.http.nonProxyHosts=local.net|some.host.com

systemProp.https.keepAlive=true
systemProp.https.proxyHost=host
systemProp.https.proxyPort=port
systemProp.https.proxyUser=username_ifneeded
systemProp.https.proxyPassword=password_ifneeded
systemProp.https.nonProxyHosts=local.net|some.host.com
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!