zoukankan      html  css  js  c++  java
  • 错误:com.android.builder.packaging.DuplicateFileException: Duplicate files copied

    Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
    > com.android.build.api.transform.TransformException: 
    com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/README.md <!-- 这里提示的是相同文件冲突的名称--> File1: D:CooKaracookaraclientapplibsyoutubevget.jar File2: C:Usersguoxw.gradlecachesmodules-2files-2.1org.jsoupjsoup1.10.3842f960942503cf1abbcc8c173a7f2c19d43726jsoup-1.10.3.jar

    1.加入jar包,多个jar包有相同文件产生的问题。

    2.解决方法: buile.gradle

    apply plugin: 'com.android.application'
    android {
        compileSdkVersion 25
        buildToolsVersion "25.0.3"
     
    <!-- 添加的解决方法 --> packagingOptions { exclude 'META-INF/README.md' // 该处是上面错误异常提示的文件名 exclude 'META-INF/CHANGES' }

    defaultConfig { applicationId "" minSdkVersion 16 targetSdkVersion 25 versionCode 20 versionName "2.21" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } sourceSets { main { jniLibs.srcDirs = ['libs'] } } } 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 'com.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.nightonke: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') }

      

    今天多一点积累,明天少一分烦恼
  • 相关阅读:
    我的管理/创业类文章
    去硅谷之前写的文章.
    【Linux资源管理】一款优秀的linux监控工具——nmon
    Oracle 11g密码过期问题
    HP-UNIX平台修改Oracle processes参数报错:ORA-27154、ORA-27300、ORA-27301、ORA-27302
    [转]收集Oracle UNDO诊断信息脚本
    【Linux资源管理】使用sar进行性能分析
    Oracle ASM
    Oracle oerr工具介绍
    Oracle分区表删除分区引发错误ORA-01502: 索引或这类索引的分区处于不可用状态
  • 原文地址:https://www.cnblogs.com/galibujianbusana/p/7419438.html
Copyright © 2011-2022 走看看