Android studio 3.5.3 第一次启动卡在gradle sync,run是灰色的

Android studio 3.5.3 第一次启动卡在gradle sync,run是灰色的_第1张图片将build.gradle文件内的google()和jcenter()全部注释掉,换成阿里云的,重启Android studio,等待一会下载相关文件,就可以完成gradle了

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        maven{ url 'https://maven.aliyun.com/nexus/content/repositories/google' }
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
//        google()
//        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
        
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

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

task clean(type: Delete) {
    delete rootProject.buildDir
}

你可能感兴趣的:(Android)