Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven Repository for Apache Http MultipartEntityBuilder

Tags:

android

maven

I am trying to import 'MultipartEntityBuilder' file to an Android project but cannot for the life of me find the right repository.

Have tried this three off Apache HttpComponents website with no luck :

compile 'org.apache.httpcomponents:httpcore:4.4.3'
compile 'org.apache.httpcomponents:httpclient:4.5.1'
compile 'org.apache.httpcomponents:httpasyncclient:4.1'

Can anyone point me in the correct direction? Thanks in advance.

like image 447
Jon Avatar asked Jul 27 '26 03:07

Jon


1 Answers

answering my own question (after about an hour of searching)...

compile 'org.apache.httpcomponents:httpcore:4.4.3'
compile 'org.apache.httpcomponents:httpmime:4.5.1'

the last one has MultipartEntityBuilder in it. Can take out httpasyncclient and httpclient

Also need to adds excludes in you gradle file: Duplicate files copied (Android Studio 0.4.0)

packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
}

Spits the dummy otherwise and tells you stuff (in red) you don't care about related to duplicate files.

like image 99
Jon Avatar answered Jul 29 '26 20:07

Jon