Error: Com.android.builder.packaging.DuplicateFileException:Duplicate files copied

Source: Internet
Author: User


meta-inf/readme.md <!--here is a hint of the same file conflict name--file1:d:\cookara\cookaraclient\app\libs\ Youtubevget.jarfile2:c:\users\guoxw\.gradle\caches\modules-2\files-2.1\org.jsoup\jsoup\1.10.3\ B842f960942503cf1abbcc8c173a7f2c19d43726\jsoup-1.10.3.jar

1. Adding a jar package, multiple jar packages have the same problem as the file.

2. Workaround: Buile.gradle

Apply plugin: ' Com.android.application ' android {compilesdkversion buildtoolsversion "25.0.3"
<!--added Solutions-- packagingoptions {exclude ' meta-inf/readme.md '//This is the file name of the above error exception prompt exclude ' meta-inf/changes ' }

defaultconfig {ApplicationID "com.multak.cookaraclient" Minsdkversion targetsdkversion 25 Versioncode versionname "2.21" Testinstrumentationrunner "Android.support.test.runner.AndroidJUnitRun Ner "} buildtypes {release {minifyenabled false proguardfiles Getdefaultproguardfile ( ' Proguard-android.txt '), ' Proguard-rules.pro '}} sourcesets {main {jnilibs.srcdirs = [' l IBS ']}}}dependencies {compile filetree (include: [' *.jar '], dir: ' Libs ') androidtestcompile (' Com.android . support.test.espresso:espresso-core:2.2.2 ', {Exclude group: ' Com.android.support ', module: ' Support-annotations ' }) Compile project (': Ripplelibrary ')/////compile ' com.android.support:appcompat-v7:25.3.1 ' compile ' co m.android.support.constraint:constraint-layout:1.0.2 ' compile ' com.android.support:design:25.3.1 ' compile ' Com.android.support:support-v4:25.3.1 ' compile ' org.greenrobot:eventbus:3.0.0 ' compile ' com.larswerkman:holocolorpicker:1.5 ' compile ' com.nightonk e:boommenu:2.1.0 ' compile ' com.android.support:palette-v7:25.3.1 ' compile ' com.dingmouren.paletteimageview: paletteimageview:1.0.6 ' compile ' com.github.devlight.shadowlayout:library:1.0.2 ' compile ' com.sdsmdg.harjot: croller:1.0.2 ' testcompile ' junit:junit:4.12 ' Compile files (' Libs/picasso-2.5.2.jar ') compile files (' Libs/xstream -1.4.7.jar ') Compile files (' Libs/jackson-databind-2.1.5.jar ') compile files (' Libs/youtubevget.jar ')}

  

Error: Com.android.builder.packaging.DuplicateFileException:Duplicate files copied

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.