Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.ide.common.process.ProcessException:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.ide.common.process.ProcessException:

这是我现在得到的ERROR,我也在Whosebug中搜索了一些线程,但没有用,正在寻找解决方案。

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

build.gradle (Module:APP)

 apply plugin: 'com.android.application'
buildscript {
repositories {
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
   }
}

repositories {
maven { url 'https://maven.fabric.io/public' }
}

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "com.whyz.kitetech.mobile.cdrapp"
    minSdkVersion 16
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
}
dexOptions {
    javaMaxHeapSize "4g"
}
buildTypes {

    debug {
        debuggable = true
    }
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
packagingOptions {
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE-FIREBASE.txt'
    exclude 'META-INF/NOTICE'
 }
 }

dependencies {
compile fileTree(dir: 'libs')
testCompile 'junit:junit:4.12'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
    transitive = true;
}
compile('com.digits.sdk.android:digits:1.9.4@aar') {
    transitive = true;
}
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'com.google.android.gms:play-services-location:8.3.0'
compile 'com.firebase:firebase-client-android:2.5.0'
compile 'com.google.android.gms:play-services-maps:8.3.0'
}

build.gradle(项目:APP)

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:1.5.0'
    classpath 'com.google.gms:google-services:2.0.0-alpha6'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    jcenter()
}
}

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

您可以将以下行添加到您的 build.gradle

android {
...
defaultConfig {
    ...
    multiDexEnabled true
    }
}

看看这个link

终于我解决了我的问题,谢谢你 support.This 是我的 Gradle 文件。

build.gradle(模块:应用程序)

buildscript {
repositories {
    maven { url 'https://maven.fabric.io/public' }
  }

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
 }
}
 apply plugin: 'com.android.application'
 apply plugin: 'io.fabric'
 apply plugin: 'com.google.gms.google-services'

repositories {
   maven { url 'https://maven.fabric.io/public' }
 }


android {
   compileSdkVersion 23
   buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "com.whyz.kitetech.mobile.cdrapp"
    minSdkVersion 16
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
}
dexOptions {
    javaMaxHeapSize "4g"
}
buildTypes {

    debug {
        debuggable = true
    }
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'),     'proguard-rules.pro'
    }
}
packagingOptions {
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE-FIREBASE.txt'
    exclude 'META-INF/NOTICE'
   }
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
    transitive = true;
}
compile('com.digits.sdk.android:digits:1.9.4@aar') {
    transitive = true;
}

compile 'com.android.support:cardview-v7:23.0.1'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.firebaseui:firebase-ui:0.3.1'
compile 'com.google.android.gms:play-services-location:8.3.0'
compile 'com.firebase:firebase-client-android:2.5.0'
compile 'com.google.android.gms:play-services-maps:8.3.0'
compile 'com.android.support:multidex:1.0.0'
compile 'org.apache.commons:commons-io:1.3.2'
}