将PowerMock添加到我的gradle文件中,现在在构建时,我得到ZipException:重复条目:org / junit / ClassRule.class

时间:2016-03-18 10:27:25

标签: android gradle powermock

将PowerMock添加到我的gradle文件中,现在构建时,我收到ZipException:重复条目:org / junit / ClassRule.class

这是我build.gradle

的相关部分
androidTestCompile 'org.mockito:mockito-core:1.10.19'
androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
androidTestCompile('junit:junit-dep:4.+') {
    exclude module: 'hamcrest'
    exclude module: 'hamcrest-core'
}
androidTestCompile('com.android.support:multidex-instrumentation:1.0.1') {
    exclude group: 'com.android.support', module: 'multidex'
}
androidTestCompile ('org.powermock:powermock-module-junit4:1.6.3') {
    exclude module: 'hamcrest-core' exclude module: 'objenesis'
}

如何从powermock声明中排除junit

1 个答案:

答案 0 :(得分:2)

添加/d/e/c = [svn]https://dog/svn/a/b/c/ 做到了:

svn