2016-04-24 5 views
1

Fehler: Gradle: Ausführung fehlgeschlagen für Task ': app: dexDebug'.Ausführung fehlgeschlagen für Task ': app: dexDebug' Nicht-Null-Exit-Wert 2

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/local/java/jdk1.8.0_73/bin/java'' finished with non-zero exit value 2
This Error comes in all my projects

build.gradle Datei

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.2" 

    defaultConfig { 
     applicationId "com.example.mukesh.airpollution" 
     minSdkVersion 15 
     targetSdkVersion 23 
     versionCode 1 
     versionName "1.0" 
    } 

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

dependencies { 
    compile group: 'cz.msebera.android', name: 'httpclient', version: '4.4.1.1' 
} 

dependencies { 
    compile 'com.android.support:recyclerview-v7:23.1.1' 
} 

dependencies { 
    compile 'com.loopj.android:android-async-http:1.4.4' 
} 

dependencies { 
    compile 'com.google.code.gson:gson:2.2.4' 
} 

dependencies { 
    compile group: 'cz.msebera.android', name: 'httpclient', version: '4.4.1.1' 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:23.1.1' 
    compile 'com.google.android.gms:play-services:8.3.0' 
    compile 'com.google.maps.android:android-maps-utils:0.4+' 
} 
+0

Veröffentlichen Sie Ihre build.gradle-Datei. –

+0

Dies kann ein Multidex-Problem sein. Versuchen Sie, die Multidex-Unterstützung anzuwenden. siehe http://stackoverflow.com/questions/32407985/android-app-loading-library-at-runtime-on-lollipop-but-not-icecreamsandwich/36263927#36263927 – Devrim

+0

@MonishKamble hinzugefügt Gradle-Datei –

Antwort

1

Versuchen Sie build.gradle Verdichten wie unter (entfernt doppelten Eintrag für Httpclient):

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 23 
buildToolsVersion "23.0.2" 

defaultConfig { 
    applicationId "com.example.mukesh.airpollution" 
    minSdkVersion 15 
    targetSdkVersion 23 
    versionCode 1 
    versionName "1.0" 
} 

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.1.1' 
compile 'com.android.support:recyclerview-v7:23.1.1' 
compile 'com.google.android.gms:play-services:8.3.0' 
compile 'com.google.maps.android:android-maps-utils:0.4+' 
compile 'com.google.code.gson:gson:2.2.4' 
compile 'com.loopj.android:android-async-http:1.4.4' 
compile group: 'cz.msebera.android', name: 'httpclient', version: '4.4.1.1' 
} 

mir sagen, ob es funktioniert ?

+0

Dies gibt auch denselben Fehler. –

Verwandte Themen