Android Studio App Build失败(:app:transformClassesWithDexForDebug)

时间:2016-02-14 11:44:57

标签: android android-studio gradle dependencies dex

我正在使用Android Studio中的应用程序。一切都很好,然后出现了粘性构建错误。

如果我只是同步和构建它工作正常,但当我尝试在设备中运行应用程序时,会出现以下错误。

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java'' finished with non-zero exit value 3

这是app 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'

android {
    signingConfigs {
        release {
        }
        debug {
        }
    }
    compileSdkVersion 'Google Inc.:Google APIs:23'
    buildToolsVersion '23.0.2'
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        applicationId "com.abc.xyz"
        minSdkVersion 17
        targetSdkVersion 22
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
        debug {
            signingConfig signingConfigs.debug
        }
    }
}
repositories {
    maven {
        url "http://dl.bintray.com/urbanairship/android"
    }
    flatDir {
        dirs 'libs'
    }
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:support-v4:23.1.1'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.google.android.gms:play-services:8.4.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'org.apache.commons:commons-collections4:4.0'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.slider:library:1.1.5@aar'
    compile 'com.google.maps.android:android-maps-utils:0.3.4'
    compile 'com.urbanairship.android:urbanairship-sdk:6.4.3'
    compile 'info.hoang8f:android-segmented:1.0.6'
    compile 'com.google.guava:guava:18.0'
    compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
        transitive = true;
    }
    compile files('libs/gimbal.jar')
    compile name: 'sugar-1.4'
}

尝试了很多东西,却无法把它拿走。

0 个答案:

没有答案