Android studio项目依赖项冲突解决方法

1冲突

Error:Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (25.1.0) and test app (23.1.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.

 解决方法  在app gradle 中添加如下

configurations.all {
  resolutionStrategy.force 'com.android.support:support-annotations:23.1.1'
}

完美解决

2 冲突

Error:Conflict with dependency 'com.google.code.findbugs:jsr305' in project ':app'. Resolved versions for app (3.0.1) and test app (2.0.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.

 

解决方法 在app gradle 中添加如下

configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:2.0.1'
}

 

转载于:https://www.cnblogs.com/teddy-yan/p/6841022.html

你可能感兴趣的:(Android studio项目依赖项冲突解决方法)