gradle重复依赖终极方案解决办法
Posted baiyi168
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了gradle重复依赖终极方案解决办法相关的知识,希望对你有一定的参考价值。
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath ‘com.android.tools.build:gradle:3.1.3‘
classpath ‘org.greenrobot:greendao-gradle-plugin:3.2.1‘
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == ‘com.android.support‘
&& !details.requested.name.contains(‘multidex‘) ) {
details.useVersion "25.4.0"
}
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
以上是关于gradle重复依赖终极方案解决办法的主要内容,如果未能解决你的问题,请参考以下文章
Android Studio一直build一直refreshing一直buiding gradle project into的终极解决办法
STAF no JSTAF in java.library.path 的终极解决办法