Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/392.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 渐变-删除所有重复的依赖项,只保留一个_Java_Gradle - Fatal编程技术网

Java 渐变-删除所有重复的依赖项,只保留一个

Java 渐变-删除所有重复的依赖项,只保留一个,java,gradle,Java,Gradle,我试图删除所有重复项以将其保持在64K限制之下(现在我有65239,这不好,因为在本例中,我需要使用multidex,这需要另一个依赖项),但我找不到关于如何从子组中删除模块的任何信息 例如,在com.android.support:support-v4:26.1.0下,几乎每个子依赖项都有com.android.support:support compat:26.1.0,我需要删除它,因为com.android.support:support-v4:26.1.0的根目录中已经有一个,我需要保留

我试图删除所有重复项以将其保持在64K限制之下(现在我有65239,这不好,因为在本例中,我需要使用multidex,这需要另一个依赖项),但我找不到关于如何从子组中删除模块的任何信息

例如,在
com.android.support:support-v4:26.1.0
下,几乎每个子依赖项都有
com.android.support:support compat:26.1.0
,我需要删除它,因为
com.android.support:support-v4:26.1.0
的根目录中已经有一个,我需要保留这个

//更新: 下面的线程讨论一个不同的问题,即涉及不同版本的依赖项的问题。我没有这个问题,我使用的所有依赖项都有我需要的版本

我需要删除所有标有
(*)

我的gradle依赖关系

implementation 'com.android.support:appcompat-v7:26.1.0'
implementation ('com.android.support:recyclerview-v7:26.1.0') {
    exclude group: 'com.android.support', module: 'support-compat'
    exclude group: 'com.android.support', module: 'support-core-ui'
}
implementation 'com.android.support:design:26.1.0'

implementation ('com.google.guava:guava:23.3-android')
implementation ('com.jakewharton:butterknife:8.8.1') {
    exclude group: 'com.android.support', module: 'support-compat'
}
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

annotationProcessor 'android.arch.persistence.room:compiler:1.0.0-rc1'
annotationProcessor 'android.arch.lifecycle:common-java8:1.0.0-rc1'

implementation ('android.arch.persistence.room:runtime:1.0.0-rc1') {
    exclude group: 'com.android.support', module: 'support-annotations'
    exclude group: 'com.android.support', module: 'support-core-utils'
}

implementation ('android.arch.lifecycle:extensions:1.0.0-rc1') {
    exclude group: 'android.arch.lifecycle:', module: 'runtime'
    exclude group: 'android.arch.core', module: 'common'
    exclude group: 'android.arch.core', module: 'runtime'
    exclude group: 'com.android.support', module: 'support-fragment'
    exclude group: 'android.arch.lifecycle', module: 'common'
}


testImplementation ('junit:junit:4.12')
testImplementation 'org.mockito:mockito-core:2.11.0'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test:rules:1.0.1'
androidTestImplementation 'android.arch.persistence.room:testing:1.0.0-rc1'
testImplementation 'android.arch.core:core-testing:1.0.0-rc1'

implementation (project(':library')) {
    exclude group: 'com.google.guava', module:'guava'
    exclude group: 'junit', module: 'junit'
}
可能重复的
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation ('com.android.support:recyclerview-v7:26.1.0') {
    exclude group: 'com.android.support', module: 'support-compat'
    exclude group: 'com.android.support', module: 'support-core-ui'
}
implementation 'com.android.support:design:26.1.0'

implementation ('com.google.guava:guava:23.3-android')
implementation ('com.jakewharton:butterknife:8.8.1') {
    exclude group: 'com.android.support', module: 'support-compat'
}
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

annotationProcessor 'android.arch.persistence.room:compiler:1.0.0-rc1'
annotationProcessor 'android.arch.lifecycle:common-java8:1.0.0-rc1'

implementation ('android.arch.persistence.room:runtime:1.0.0-rc1') {
    exclude group: 'com.android.support', module: 'support-annotations'
    exclude group: 'com.android.support', module: 'support-core-utils'
}

implementation ('android.arch.lifecycle:extensions:1.0.0-rc1') {
    exclude group: 'android.arch.lifecycle:', module: 'runtime'
    exclude group: 'android.arch.core', module: 'common'
    exclude group: 'android.arch.core', module: 'runtime'
    exclude group: 'com.android.support', module: 'support-fragment'
    exclude group: 'android.arch.lifecycle', module: 'common'
}


testImplementation ('junit:junit:4.12')
testImplementation 'org.mockito:mockito-core:2.11.0'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test:rules:1.0.1'
androidTestImplementation 'android.arch.persistence.room:testing:1.0.0-rc1'
testImplementation 'android.arch.core:core-testing:1.0.0-rc1'

implementation (project(':library')) {
    exclude group: 'com.google.guava', module:'guava'
    exclude group: 'junit', module: 'junit'
}