当前位置: 首页 > 知识库问答 >
问题:

APK meta_inf/notice中复制了重复文件[duplicate]

禄和宜
2023-03-14
apply plugin: 'android'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 19
    buildToolsVersion '19.1.0'

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
     }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:support-v4:19.1.0'
    compile 'com.android.support:appcompat-v7:19.1.0'
    compile 'com.google.android.gms:play-services:+'
    compile 'org.apache.commons:commons-lang3:3.3.2'
    compile 'org.apache.httpcomponents:httpclient-android:4.3.3'
    compile 'org.apache.httpcomponents:httpmime:4.3.3'
}
Error:Execution failed for task ':myalcoholist:packageDebug'.
> Duplicate files copied in APK META-INF/NOTICE
File 1: /home/ufk/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpmime/4.3.3/e02368d7b56c0c376f227378a4f77de62864d020/httpmime-4.3.3.jar
File 2: /home/ufk/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpmime/4.3.3/e02368d7b56c0c376f227378a4f77de62864d020/httpmime-4.3.3.jar

有什么想法吗?

共有1个答案

凌俊语
2023-03-14
android {
    packagingOptions {
        exclude 'META-INF/NOTICE'
    }
}
 类似资料: