Error:Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.
解决方案:
1、settings->Build,Execution,Deployment->Build Tools->Gradle->Use local gradle distribution->Gradle home 指定gradle为本地已下载的gradle 如gradle-2.4
2、修改工程根目录下的build.gradle 中的 classpath 为 指定gradle版本以支持 上述中gradle home指定的gradle版本号 如:gradle-2.4 对应的 classpath 如下:
classpath 'com.android.tools.build:gradle:1.5.0'
3、在gradle->wrapper->gradle-wrapper.properties 将distributionUrl改为对应的gradle版本下载路径,如下:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4.zip
4、Sync Project with Gradle Files
本文介绍了解决Gradle连接超时的具体步骤,包括设置本地Gradle分发、修改build.gradle文件中的classpath、更新gradle-wrapper.properties文件中的distributionUrl等。
4万+

被折叠的 条评论
为什么被折叠?



