由于 Android Studio 冲突,依赖被忽略 [英] Dependency ignored because of conflict Android studio
问题描述
我正在尝试添加以下依赖项,但它被忽略了.我不明白如何解决它请帮助我谢谢.
依赖
编译 'com.google.apis:google-api-services-drive:v2-rev170-1.20.0'
<块引用>
警告忽略依赖
警告:依赖 org.apache.httpcomponents:httpclient:4.0.1 在调试时被忽略,因为它可能与内部版本冲突安卓提供.有问题请用jarjar重新打包更改类包Warning:Dependencyorg.apache.httpcomponents:httpclient:4.0.1 被忽略发布为它可能与Android提供的内部版本冲突.有问题请用jarjar重新打包换类包
您可以在模块的 build.gradle 文件中排除依赖项.
compile('com.google.apis:google-api-services-drive:v2-rev170-1.20.0') {排除模块:'httpclient'//按工件名称排除组:'org.apache.httpcomponents'//按组排除组:'org.apache.httpcomponents',模块:'httpclient'//通过名称和组}
I'm trying to add the following dependency but it is ignore. I can't understand how to resolve it please help me Thank you.
Dependency
compile 'com.google.apis:google-api-services-drive:v2-rev170-1.20.0'
Waring for ignoring dependency
Warning:Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for debug as it may be conflicting with the internal version provided by Android. In case of problem, please repackage it with jarjar to change the class packages Warning:Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for release as it may be conflicting with the internal version provided by Android. In case of problem, please repackage it with jarjar to change the class packages
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
}
这篇关于由于 Android Studio 冲突,依赖被忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!