你可以在project的build.gradle中添加一行:
maven { url "https://jitpack.io" }
例如:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
//---------------------------------------在这里加上--------------------------------------------------
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
//----------------------------------------------------------------------------完--------------------------------------------------------------------