解决Android Studio gradle 在Gradle Download maven-metadata很慢问题

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

buildscript {
    ext.kotlin_version = '1.3.61'
    repositories {
      //最新阿里镜像 
    maven{ url 'https://maven.aliyun.com/repository/public' } 
    // 替代jcenter()
    maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
    google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.1'
      
    }
}
allprojects {
    repositories {
       //最新阿里镜像
        maven{ url 'https://maven.aliyun.com/repository/public' }
       // 替代jcenter()
        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
        google()
       
    }
}

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

猜你喜欢

转载自blog.csdn.net/qq_30081107/article/details/109028210