2017-04-24 63 views
1

我正在将httpclient-android-4.3.5.1.jar文件与我在依赖关系中添加的aar文件之一相关联。如何从外部库中排除'jar'文件

我想从此依赖项中排除此jar,因为这给我duplicate库错误消息。

我已经尝试了很多东西,从

exclude group: 'org.apache.httpcomponents', module: 'httpclient-android' 

 {exclude module: "httpclient-android-4.3.5.1"} 

但没有什么帮助时,”的.jar file is still there and part of SDK`

enter image description here

+1

你试图做'编译( 'lib目录下:版本'){排除组: 'org.apache.httpcomponents',模块:“HttpClient的,Android的}' –

+0

是的,我正在尝试这个;编译(名称:'MY-SDK-1.1.1',ext:'aar'){排除组:'org.apache.httpcomponents',模块:'httpclient-android'} – Kirmani88

+0

您是否正在编译某些东西。/libs文件夹?如果有的话,这个链接可能是有趣的https://groups.google.com/forum/#!topic/adt-dev/g1AiJM7PeVs –

回答

0

你有没有尝试,这也?:

configurations { all { exclude module: 'httpclient' exclude module: 'httpcore' } } 
+0

不,让我试试这个 – Kirmani88

+0

好吧,让我知道什么 –

+0

什么都没有改变 – Kirmani88