Gradle错误:错误:任务':app:dexDebug'执行失败

时间:2015-09-02 19:58:46

标签: android gradle android-gradle build.gradle

  

com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令' C:\ Program Files \ Java \ jdk1.8.0_25 \ bin \的java.exe''完成非零退出值2

这是我的gradle文件。我正在尝试添加zxing嵌入式依赖项。

apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
    applicationId "it.jaschke.alexandria"
    minSdkVersion 15
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
}

jacoco {
    version = '0.6.2.201302030002'
}

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
    release {
        testCoverageEnabled = true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    debug{
        testCoverageEnabled = true
    }

}
lintOptions {
    abortOnError false
}
}
repositories {
jcenter()
}

dependencies {
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.journeyapps:zxing-android-embedded:3.0.2@aar'
compile 'com.google.zxing:core:3.2.0'
}

1 个答案:

答案 0 :(得分:0)

我通过更新android sdk然后清理并重建项目来修复它。不知道导致错误的原因,但它确实有效。