2016-04-13 5 views
1

Im Erstellen einer App mit Firebase und Creative SDK, zuerst habe ich Firebase Abhängigkeiten hinzugefügt und es funktionierte ohne irgendein Problem. Danach habe ich die Abhängigkeiten des Creative SDK hinzugefügt und einige Probleme festgestellt.Ich erhalte einen Fehler beim Hinzufügen von Creative SDK DependenciesError: Ausführung für Task fehlgeschlagen ': app: transformResourcesWithMergeJavaResForDebug'

Ich habe einen Fehler beim Erstellen des Projekts

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/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

Heres meine gradle Projektdatei

// 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 
} 

und meine app gradle Datei

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' 
} 

Antwort

1

Dies wurde bereits beantwortet, aber die Antwort scheint verschwunden zu sein ... Nur für den Fall:

Versuchen Sie, diese Zeile aus Ihrer gradle Config entfernen:

exclude 'META-INF/LICENSE.txt' 

Danach versuchen/Reinigung das Projekt im Android Studio neu zu erstellen.

Verwandte Themen