Dependency ignored because of conflict Android studio

送分小仙女□ 提交于 2019-11-27 04:03:13

You can exclude dependencies in the build.gradle file of your module.

compile('com.google.apis:google-api-services-drive:v2-rev170-1.20.0') {
    exclude module: 'httpclient' //by artifact name
    exclude group: 'org.apache.httpcomponents' //by group
    exclude group: 'org.apache.httpcomponents', module: 'httpclient' //by both name and group
}
teh.fonsi

Exclude module httpclient from all configurations. Add this code in the build.gradle file:

configurations {
    compile.exclude group: "org.apache.httpcomponents", module: "httpclient"
}

Use the following code to exclude the conflicting modules from the google APIs library.

 compile 'com.google.apis:google-api-services-drive:v2-rev170-1.20.0' {
    exclude module: 'httpcore'
    exclude module: 'httpclient'
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!