# 高效解决Error:Connection timed out: connect. If you are behind an HTTP proxy, please configure the pro

高效解决Error:Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy

当打开别人的项目的时候,有时候会运行不起来,会报次错误,因此在这里记录一下

第一步:修改gradle的版本

  • 打开gradle-wrapper.properties然后将项目中的gradle的版本改成自己本地下载好的(可以找个已经成功运行的项目进行复制),我这里换成了我本地已经可以运行项目的gradle

    #Fri Jan 07 11:39:43 CST 2022
    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
    
  • 打开项目根目录下的build.gradle,修改对应的classpath,我这里修改成了

  • dependencies {
        classpath 'com.android.tools.build:gradle:3.6.0'
    
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
    

第二步

然后Try Again就ok了,如何按照上面的解决办法还是会报错**Connect to maven.google.com:443 [maven.google.com] failed: Connection timed out: connect **

可以查看解决Connect to maven.google.com:443 [maven.google.com] failed: Connection timed out: connect 这篇文章进行解决

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值