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

Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.

项目之前是好的,一段时间没用,今天打开就出现上面的问题.网上尝试了各种方法,比如手动帮AS下载对应zip,比如架VPN,一天过去了,并没有解决.

只能在同事帮忙下进行一个大招的放:

repositories {
        maven {
            url 'http://maven.aliyun.com/nexus/content/groups/public'
//            url 'https://maven.google.com/'
//            name 'Google'
        }
        google()
        jcenter()
 
    }


 

allprojects {
    repositories {
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
        google()
        jcenter()
 
    }
}