Android Studio added Httpmime,httpcore encountered bugs and workarounds.

Source: Internet
Author: User

Today when uploading the file with Multipartentitybuilder, add the Httpcore, such as 2 dependent libraries, the compile run time, Studio appeared a strange error prompt:

DuplicateFiles copiedInchAPK META-Inf/DEPENDENCIESFile 1: /home/Bluelife/.Gradle/Caches/Modules-2/Files-2.1/Org.Apache.Httpcomponents/Httpmime/4.3.1/f7899276dddd01d8a42ecfe27e7031fcf9824422/Httpmime-4.3.5. jarFile 2: /home/Bluelife/.gradle/caches/ Modules-2/files-< Span class= "lit" >2.1/org. Apache. Httpcomponents/httpmime/4.3 1/f7899276dddd01d8a42ecfe27e7031fcf9824422 /httpmime-4.3.5.jar 

did not know where the error occurred, and finally Google found a workaround. The
need to add the following configuration in the Build.gradle file:

Android {    packagingoptions {        ' meta-inf/dependencies '        meta-inf/notice '         ' meta-inf/license        ' meta-inf/license.txt        ' meta-inf/notice.txt '    }     //  ...}

Successfully compiled. (Note that I am currently using the latest version of Candy version 0.8.11)

              

Android Studio added bugs and workarounds that Httpmime,httpcore encountered.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.