Andoird Gradle 修改依赖文件内容
程序员文章站
2022-03-30 18:45:57
用Android Studio 开发时,由于使用默认的源下载非常慢,因此修改为国内的镜像源。//依赖资源repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' } maven { url 'http://maven.al....
用Android Studio 开发时,由于使用默认的源下载非常慢,因此修改为国内的镜像源。
//依赖资源
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
}
buildscript {
//依赖文件
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
}
//相应的以来文件包
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
本文地址:https://blog.csdn.net/sundy_ywz/article/details/108168850
上一篇: 详解PILLOW图片中加入中文的实例
下一篇: 小米CC开机动画首曝光:改头换面