【问题标题】:Error:Execution failed for task ':app:dexDebug'.....' finished with non-zero exit value 2错误:任务':app:dexDebug'.....'的执行失败以非零退出值2完成
【发布时间】:2015-08-12 14:31:59
【问题描述】:

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

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_75\bin\java.exe'' 完成非零退出值 2

我阅读了一些建议,我尝试了所有这些,但我仍然无法解决问题。请帮助

这里的依赖->

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile files('libs/google-play-services.jar')
compile files('libs/Parse-1.3.2.jar')
compile files('libs/Parse-1.6.0.jar')

}

【问题讨论】:

  • 为什么引用 Parse.jar 两次?

标签: android android-studio google-api dependencies


【解决方案1】:
  1. 移除一个 Parse.jar(Android studio 不知道首选哪个版本)

  2. compile 'com.google.android.gms:play-services:7.5.0'

而不是

compile files('libs/google-play-services.jar')

由于 google 服务包含 res 文件,因此它们不能仅通过 .jar 导入

  1. 删除compile fileTree(dir: 'libs', include: ['*.jar']),因为您不想编译所有库中的内容。

【讨论】:

    猜你喜欢
    • 2015-06-27
    • 1970-01-01
    • 2015-10-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-31
    • 2016-04-15
    • 1970-01-01
    相关资源
    最近更新 更多