Happy3w

gradle编译失败: Gradle sync failed: Connection timed out: connect. If you are behind an HTTP proxy

2017.01.10
开发环境:Android studio 1.5+win7 问题描述: 下载了一个Example,导入之后,运行出现如下错误提示: Gradle sync failed: Connection timed out: connect. If you are behind an HTTP proxy 解决方案: gradle下载依赖项时网站被毙了,若有网络代理,可通过设置代理解决,代理设置方式: systemProp.http.proxyHost=proxyaddress systemProp.http.proxyPort=proxyport systemProp.https.proxyHost=proxyaddress systemProp.https.proxyPort=proxyport 其中proxyaddress:代理地址,proxyport:代理端口。 参考文档:http://stackoverflow.com/questions/31803610/gradle-behind-proxy-in-android-studio-1-3