Som*_*ent 8 java android mockito powermock dexmaker
我正在尝试使用以下build.gradle配置将Powermock作为我的Android测试的依赖项:
dependencies{
compile 'com.android.support:appcompat-v7:21.0.+'
androidTestCompile('org.mockito:mockito-core:1.9.5')
androidTestCompile('com.google.dexmaker:dexmaker:1.2')
androidTestCompile('com.google.dexmaker:dexmaker-mockito:1.2')
androidTestCompile('org.powermock:powermock-module-junit4:1.5.5') {
exclude module: 'junit'
}
androidTestCompile('org.powermock:powermock-api-mockito:1.5.5') {
exclude module: 'mockito-all'
}
}
Run Code Online (Sandbox Code Playgroud)
但是,编译器抱怨说
Error:Gradle: Execution failed for task ':app:packageDebugTest'.
> Duplicate files copied in APK mockito-extensions/org.mockito.plugins.MockMaker
File 1: ~/.gradle/caches/modules-2/files-2.1/com.google.dexmaker/dexmaker-mockito/1.2/b99884a4c6ef6335ba376f79aa79632b2421c17c/dexmaker-mockito-1.2.jar
File 2: ~/.gradle/caches/modules-2/files-2.1/com.google.dexmaker/dexmaker-mockito/1.2/b99884a4c6ef6335ba376f79aa79632b2421c17c/dexmaker-mockito-1.2.jar
Run Code Online (Sandbox Code Playgroud)
展望罐子结构,我注意到Dexmaker和Powermock都宣布MockMaker在mockito-extensions

什么是MockMaker?他们有什么不同?最重要的问题是:是否有可能让Powermock与Dexmaker很好地合作?
提前致谢.任何帮助将不胜感激.
| 归档时间: |
|
| 查看次数: |
2358 次 |
| 最近记录: |