在做項(xiàng)目的過程中我們會(huì)發(fā)現(xiàn)添加的遠(yuǎn)程jar需要很長(zhǎng)時(shí)間才能下載下來,這樣我們可以改變里面的build.gradle文件.
原始文件:
整個(gè)替換成阿里的鏡像庫:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven { url'https://maven.aliyun.com/repository/public/' }
maven { url'https://maven.aliyun.com/repository/google/' }
maven { url'https://maven.aliyun.com/repository/jcenter/' }
maven { url'https://maven.aliyun.com/repository/central/' }
}
dependencies {
classpath'com.android.tools.build:gradle:3.1.0'
? ? }
}
allprojects {
repositories {
maven { url"https://raw.githubusercontent.com/HyphenateInc/Hyphenate-SDK-Android/master/repository" }
maven { url'https://maven.aliyun.com/repository/public/' }
maven { url'https://maven.aliyun.com/repository/google/' }
maven { url'https://maven.aliyun.com/repository/jcenter/' }
maven { url'https://maven.aliyun.com/repository/central/' }
}
}
over !