2017-04-24 65 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