13

After adding a dependency to "androidx.security:security-crypto:1.0.0-alpha02", I get the error message "More than one file was found with OS independent path 'build-data.properties'." I have tried to correct it by changing the version of the library (1.1.0-alpha01; 1.0.0-alpha02; 1.0.0-alpha01) and modifying the packageoptions section as I have found on the net but nothing has worked. Thanks for your help.

apply plugin: 'com.android.application'

android {
compileSdkVersion 30
buildToolsVersion "30.0.1"

defaultConfig {
    applicationId "com.skcc.myapp"
    minSdkVersion 28
    targetSdkVersion 30
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        debuggable false
    }
}

packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
}

}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.android.gms:play-services-vision:11.8.0'
implementation "androidx.security:security-crypto:1.0.0-alpha02"


//
}

1 Answers1

23

I found solution at Android Studio: Duplicate files copied in APK META-INF/DEPENDENCIES when compile

Regards

packagingOptions {
    pickFirst  '**'
}