Android development learning 20.12.06 modify the dependency warehouse to solve the dependency on turtle fast loading

After the project is created, the dependency loading process is slow, and then the Baidu solution is only recorded here.

  • Open the project storage folder, find the build.gradle file in the root directory, and modify the warehouse address inside
//原文件内容
buildscript {
    
    
    repositories {
    
    
        jcenter()
        mavenCentral()
    }
    dependencies {
    
    
        classpath "com.android.tools.build:gradle:4.1.1"
    }
}
allprojects {
    
    
    repositories {
    
    
        jcenter()
    }
}
//修改为:
buildscript {
    
    
    repositories {
    
    
        maven {
    
     url 'http://maven.aliyun.com/nexus/content/groups/public' }
    }
    dependencies {
    
    
    	//注意这里的内容不要修改
        classpath "com.android.tools.build:gradle:4.1.1"
    }
}
allprojects {
    
    
    repositories {
    
    
        maven {
    
     url 'http://maven.aliyun.com/nexus/content/groups/public' }
    }
}

Guess you like

Origin blog.csdn.net/qq_40026668/article/details/110735490