1、在app的build.gradle中的defaultConfig节点中配置configurations.all 

android{
    ...
    defaultConfig {
        configurations.all {
	    resolutionStrategy {
		failOnVersionConflict()
	    }
	}
    }  
    ...
}

2、执行gradle build或者gradle assembleRelease等,会发现提示:

Android解决冲突

 

 

 3、在defaultConfig节点中配置

android{
    ...
    defaultConfig {
        configurations.all {
	    resolutionStrategy {
          force 'com.google.code.findbugs:jsr305:3.0.2'
		failOnVersionConflict()
	    }
	}
    }  
    ...
}

  即可。

相关文章:

  • 2022-01-16
  • 2021-10-18
  • 2021-12-20
  • 2021-11-19
  • 2021-09-20
  • 2022-12-23
  • 2021-11-26
猜你喜欢
  • 2022-02-07
  • 2021-11-09
  • 2021-06-07
  • 2021-05-13
  • 2022-12-23
  • 2021-09-21
  • 2022-01-09
相关资源
相似解决方案