摇篮同步在使用代理服务器失败 [英] Gradle Sync failed while using proxy server

查看:176
本文介绍了摇篮同步在使用代理服务器失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Android的工作室,我想建立第一个应用程序。不幸的是摇篮工程同步失败错误:连接被拒绝:连接。

I have installed Android studio and i want to build first app. Unfortunately "Gradle project sync failed" Error: Connection refused: connect.

我知道这是因为我使用代理服务器(我公司所做的)。我已经取得了Setings-> HTTP的Proxy-变化>自动检测代理设置,但我想,摇篮不看就可以了。我读了我应该写在gradle.properties我的代理服务器,用户名和密码,但我不知道这个参数,我不知道如何让他们(即使它是可用与否)。

I know it's because i use proxy server (my company does). I already made changes in Setings->HTTP Proxy-> Auto-detect proxy settings, but I guess, Gradle doesn't look on it. I read I should make write in gradle.properties my proxy server, user and password, but I don't know this parameters, and i don't know how to get them (even if it is available or not).

你能帮助我吗?有两种方式:1。如果你知道的告诉我如何避免这个问题,而该参数。例如像自动侦测2.如何获得这些参数?

Can you help me? there are two ways: 1. If you know tell me how to avoid this problem without that parameters. For example like Auto-detect 2. How to get those parameters?

推荐答案

显然,这code工作

systemProp.http.proxyHost=<hostname>
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=
systemProp.http.proxyPassword=
systemProp.http.nonProxyHosts=localhost

HTTPS

systemProp.https.proxyHost=<hostname>
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=
systemProp.https.proxyPassword=
systemProp.https.nonProxyHosts=localhost

在未设置密码了。
它应该在gradle.properties文件

when password isn't set up. It should be in gradle.properties file.

这篇关于摇篮同步在使用代理服务器失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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