1. 一般是build.gradle文件里面少了三方库导致的
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.3"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.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' }
maven {
url "http://dl.bintray.com/laobie/maven"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
2. 之前我少了报错了,添加如下build文件里面就解决了
maven {
url "http://dl.bintray.com/laobie/maven"
}