0

Ich habe ein Problem, wenn ich versuche, mein Projekt in Android Studio auszuführen. Es gibt mir einen Fehler mit der Gradle-Datei. Gradle wäre daher nicht mein stärkster Punkt, ich könnte mit etwas Hilfe tun.Android Gradle Error - Ausführung fehlgeschlagen für Task ': app: dexDebug'

Der Fehler gezeigt ist:

Execution failed for task ':app:dexDebug' 
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_17\bin\java.exe'' finished with non-zero exit value 1 

Meine gradle Datei wie folgt:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.2" 

defaultConfig { 
    applicationId "com.example.ryans_000.iplan" 
    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:design:23.1.1' 
    compile 'com.facebook.android:facebook-android-sdk:[4,5)' 
    compile 'com.google.android.gms:play-services:8.3.0' 
} 

Die gradle Konsole zeigt folgendes:

:app:preBuild UP-TO-DATE 
:app:preDebugBuild UP-TO-DATE 
:app:checkDebugManifest 
:app:preReleaseBuild UP-TO-DATE 
:app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE 
:app:prepareComAndroidSupportCardviewV72311Library UP-TO-DATE 
:app:prepareComAndroidSupportDesign2311Library UP-TO-DATE 
:app:prepareComAndroidSupportMediarouterV72220Library UP-TO-DATE 
:app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE 
:app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE 
:app:prepareComFacebookAndroidFacebookAndroidSdk4100Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServices830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesAds830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesAppstate830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesAuth830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesBase830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesBasement830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesCast830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesDrive830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesFitness830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesGames830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesGcm830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesIdentity830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesLocation830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesMaps830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesNearby830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesPanorama830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesPlus830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesVision830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesWallet830Library UP-TO-DATE 
:app:prepareComGoogleAndroidGmsPlayServicesWearable830Library UP-TO-DATE 
:app:prepareDebugDependencies 
:app:compileDebugAidl UP-TO-DATE 
:app:compileDebugRenderscript UP-TO-DATE 
:app:generateDebugBuildConfig UP-TO-DATE 
:app:generateDebugAssets UP-TO-DATE 
:app:mergeDebugAssets UP-TO-DATE 
:app:generateDebugResValues UP-TO-DATE 
:app:generateDebugResources UP-TO-DATE 
:app:mergeDebugResources UP-TO-DATE 
:app:processDebugManifest UP-TO-DATE 
:app:processDebugResources UP-TO-DATE 
:app:generateDebugSources UP-TO-DATE 
:app:preDebugAndroidTestBuild UP-TO-DATE 
:app:prepareDebugAndroidTestDependencies 
:app:compileDebugAndroidTestAidl UP-TO-DATE 
:app:processDebugAndroidTestManifest UP-TO-DATE 
:app:compileDebugAndroidTestRenderscript UP-TO-DATE 
:app:generateDebugAndroidTestBuildConfig UP-TO-DATE 
:app:generateDebugAndroidTestAssets UP-TO-DATE 
:app:mergeDebugAndroidTestAssets UP-TO-DATE 
:app:generateDebugAndroidTestResValues UP-TO-DATE 
:app:generateDebugAndroidTestResources UP-TO-DATE 
:app:mergeDebugAndroidTestResources UP-TO-DATE 
:app:processDebugAndroidTestResources UP-TO-DATE 
:app:generateDebugAndroidTestSources UP-TO-DATE 
:app:processDebugJavaRes UP-TO-DATE 
:app:compileDebugJavaWithJavac UP-TO-DATE 
:app:compileDebugNdk UP-TO-DATE 
:app:compileDebugSources UP-TO-DATE 
:app:preDexDebug UP-TO-DATE 
:app:dexDebug 

Wenn jemand könnte mir helfen damit wäre ich sehr dankbar.

Vielen Dank.

+0

Verwenden Sie gradlew assemble --info, um weitere Details zu erhalten –

Antwort

0

Unter Standardkonfiguration fügen Sie die folgenden:

multiDexEnabled wahr

Sie auch die folgenden auf Ihrem Android-Objekt hinzufügen möchten, da es eine Speicherlimitierung schlagen werden, wenn Gebäude:

dexOptions { 
    javaMaxHeapSize "4g" 
} 

Versuchen Sie abschließend, Ihr Projekt zu säubern und erneut auszuführen.

Verwandte Themen