简体   繁体   中英

Maven Repository for Apache Http MultipartEntityBuilder

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM