Error:Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath'问题
1.如果引用库类型 JitPack,需要在项目的build.gradle(注意是根目录,并不是module),添加maven { url ‘https://jitpack.io’ }
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
2.引用库类型 bintray,需要在项目的build.gradle(注意是根目录,并不是module),添加
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
3.(最终方案)目前个人配置是两个兼备,再配合阿里
buildscript {
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
google()
jcenter()
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
}
}
原文链接:https://blog.csdn.net/qq_15895655/java/article/details/80855336