Android Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hanjun0612/article/details/85088946

错误内容:

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.

我们寻找External Libraries中的27.1.1版本,删掉

最后在build.gradle中添加如下代码

     androidTestCompile('com.android.support:support-annotations:26.1.0') {
        force = true
    }

猜你喜欢

转载自blog.csdn.net/hanjun0612/article/details/85088946