解决方案一
(自行搜索 查看依赖树) 类似如下结构
com.android.support.test.espresso:espresso-core:2.2.2
+--- com.squareup:javawriter:2.1.1
+--- com.android.support.test:rules:0.5
| \--- com.android.support.test:runner:0.5
| +--- junit:junit:4.12
| | \--- org.hamcrest:hamcrest-core:1.3
| \--- com.android.support.test:exposed-instrumentation-api-publish:0.5
+--- com.android.support.test:runner:0.5 (*)
+--- javax.inject:javax.inject:1
+--- org.hamcrest:hamcrest-library:1.3
| \--- org.hamcrest:hamcrest-core:1.3
>> 使用exclue排除
org.hamcrest:hamcrest-core:1.3
group:org.hamcrest
module:hamcrest-core
implementation('com.android.support.test.espresso:espresso-core:2.2')
{
exclude group:'org.hamcrest',module: 'hamcrest-core'
}
解决方案二
android {
....
configurations.all {
resolutionStrategy {
force 'com.sinochem.argcx.map:tile:1.0.4' // 强制指定使用某个版本
force 'com.sinochem.argcx:common:1.0.95'// 强制指定使用某个版本
}
}
}
网友评论