я получаю сообщение об ошибке при добавлении Creative SDK DependenciesError: Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'

я создаю приложение, используя firebase и Creative SDK, сначала я добавил зависимости от firebase, и это сработало без каких-либо проблем. после этого я добавил зависимости Creative SDK и столкнулся с некоторыми проблемами.

я получил ошибку при сборке проекта

Ошибка: не удалось выполнить задачу ':app:transformResourcesWithMergeJavaResForDebug'. com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: дубликаты файлов, скопированные в APK META-INF/LICENSE.txt File1: C:\Users\Tharaka.gradle\caches\modules-2 \files-2.1\org.apache.commons\commons-lang3\3.4\5fe28b9518e58819180a43a850fbc0dd24b7c050\commons-lang3-3.4.jar File2: C:\Program Files\Android\Android Studio\gradle\m2repository\commons-io\commons-io \2.4\commons-io-2.4.jar

Вот мой файл проекта Gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        /* 1) Add the Gradle Retrolambda Plugin */
        classpath 'me.tatarka:gradle-retrolambda:3.3.0-beta3'
    }
}

allprojects {
    repositories {
        jcenter()
        /* 2) Add mavenCentral */
       // mavenCentral()

        /* 3) Add the Creative SDK Maven repo URL */
        maven {
            url 'https://repo.adobe.com/nexus/content/repositories/releases/'
        }
        maven {
            url 'http://dl.bintray.com/raphaelbussa/maven'
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

и мой файл градиента приложения

apply plugin: 'com.android.application'

/* 1) Apply the Gradle Retrolambda Plugin */
apply plugin: 'me.tatarka.retrolambda'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.sliit.dailyselfie"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }

    /* 2) Compile for Java 1.8 or greater */
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }


    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE-FIREBASE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/DEPENDENCIES'
        pickFirst 'AndroidManifest.xml'


    }

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

}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'

    compile 'com.android.support:appcompat-v7:23.2.1'
    compile 'com.android.support:design:23.2.1'
    compile 'com.github.flavienlaurent.datetimepicker:library:0.0.2'
    compile 'com.github.supervital:swipenumberpicker:1.0.3'
    compile 'com.android.support:cardview-v7:23.2.1'
    compile 'com.android.support:recyclerview-v7:23.2.1'
    compile 'com.wrapp.floatlabelededittext:library:0.0.6'
    compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
    compile 'com.firebase:firebase-client-android:2.3.1'
    compile 'de.hdodenhof:circleimageview:2.0.0'
    compile 'info.hoang8f:fbutton:1.0.5'
    compile 'com.roughike:bottom-bar:1.2.4'
    compile 'rebus:bottom-dialog:0.0.5'

    compile 'com.adobe.creativesdk.foundation:auth:0.9.7'
    compile 'com.adobe.creativesdk:image:4.4.8'
}

person TRomesh    schedule 13.04.2016    source источник


Ответы (1)


На это уже был дан ответ, но ответ, похоже, исчез... На всякий случай:

Попробуйте удалить эту строку из конфигурации gradle:

exclude 'META-INF/LICENSE.txt'

После этого попробуйте очистить/пересобрать проект в Android Studio.

person Ash Ryan Arnwine    schedule 15.04.2016