本文主要是介绍问题:Conflict with dependency 'com.android.support:appcompat-v7' in project ':app'……,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
不同版本jar包冲突
as工程报如下错误:
Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
> Conflict with dependency 'com.android.support:appcompat-v7' 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.
解决方案1:
在对应模块的build.gradle文件中增加如下内容
configurations.all {//解决"Conflict with dependency 'com.android.supportsupport-annotations' in project 'app'"resolutionStrategy.force 'com.android.support:support-annotations:26.1.0'
}
缺点:冲突几个jar包需要配置几个
解决方案2:
工程的.idea/libraries
有相关jar的xml配置文件,删除冲突的就ok了
这篇关于问题:Conflict with dependency 'com.android.support:appcompat-v7' in project ':app'……的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!