解决 Resolved versions for app (26.1.0) and test app (27.1.1) differ 冲突依赖

Error:Execution failed for task ':app:preDebugAndroidTestBuild'.

> Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.


解决 Resolved versions for app (26.1.0) and test app (27.1.1) differ 冲突依赖_第1张图片


由上图可知,支持注解jar有两个,很明显冲突,可删除一个,方可解决,或者在build.gradle (app)中,添加如下

androidTestCompile('com.android.support:support-annotations:26.1.0') {
    force = true
}
解决 Resolved versions for app (26.1.0) and test app (27.1.1) differ 冲突依赖_第2张图片

你可能感兴趣的:(解决 Resolved versions for app (26.1.0) and test app (27.1.1) differ 冲突依赖)