Java beendet mit einem Exit-Wert ungleich Null 2 - Android Gradle

Ich erhalte diesen Fehler beim Ausführen meiner Android-App (ich habe sie bereinigt und dann erstellt, aber der Fehler ist immer noch vorhanden)

Sync: OKMake Project: OKClean: OKRun: Fehler

Error: Die Ausführung ist für die Task ': app: dexDebug' fehlgeschlagen. .Com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Verarbeiten Sie den 'Befehl' C: \ Programme \ Java \ jdk1. 7.0_25 \ bin \ java.exe '' beendet mit einem Exit-Wert ungleich Null 2

Meine gradle Datei:

apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
    applicationId "com.rzr.rzevallosr.miappdepruebas"
    minSdkVersion 19
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

productFlavors {
}

repositories {
    mavenCentral()
    flatDir {
        dirs 'libs'
    }
}
}

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

// This library handles authentication and authorization
compile 'com.spotify.sdk:spotify-auth:1.0.0-beta9@aar'
// This library handles music playback
compile 'com.spotify.sdk:spotify-player:1.0.0-beta9@aar'

compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:recyclerview-v7:21.0.+'

compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
compile 'com.squareup.okhttp:okhttp:2.2.0'

compile files('libs/spotify-web-api-android-master-0.1.0.jar')
compile files('libs/okio-1.3.0.jar')
}

EDIT: Ich habe nicht gesehen, dass "compile fileTree (dir: 'libs', include: ['* .jar'])" zweimal meine Bibliotheken kompiliert hat, also kommentiere ich nur:

//compile 'com.squareup.retrofit:retrofit:1.9.0'
//compile 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
//compile 'com.squareup.okhttp:okhttp:2.2.0'

//compile files('libs/spotify-web-api-android-master-0.1.0.jar')
//compile files('libs/okio-1.3.0.jar')

und es funktioniert gut.

Antworten auf die Frage(46)

Ihre Antwort auf die Frage