###阿里万能资源链接
#####android studio在编译项目中因为下载一些外网的资源或者github的资源导致项目初始化编译的时间很长
######解决的方法就是更换android studio下Gradle中的现在的mave的链接 阿里有一套链接可以直接映射到国内阿里的服务上大大的调高了开发效率阿里映射maVen地址
123
```
123
```
、、、
```
// 仓库
repositories {
//mavenLocal()
// 添加阿里云 maven 地址
maven { url'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
google()
// jcenter() //{url"http://jcenter.bintray.com"}
// mavenCentral()
// maven { url "https://clojars.org/repo/" } //icepick配置
maven { url"https://jitpack.io" }
}
dependencies {
classpath'com.android.tools.build:gradle:3.1.0'
// classpath 'com.android.tools.build:gradle:3.2.0'
classpath'com.jakewharton:butterknife-gradle-plugin:9.0.0-rc2' //註解
// classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0' //註解
classpath'me.tatarka:gradle-retrolambda:3.7.0' //lambda配置
//插件
classpath'com.novoda:bintray-release:0.8.0'
//GreenDao3 add plugin
classpath'org.greenrobot:greendao-gradle-plugin:3.2.2'
//kotlin
classpath"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
//数据库
// classpath "io.objectbox:objectbox-gradle-plugin:$objectboxVersion"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
// 所有项目都依赖于已下中央仓库
allprojects {
repositories {
// mavenLocal()
// 添加阿里云 maven 地址
maven { url'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
google()
//jcenter() //{ url"http://jcenter.bintray.com" }
// mavenCentral()
// maven { url "https://clojars.org/repo/" } //icepick配置
maven { url"https://jitpack.io" }
}
}
```
网友评论