错误:任务执行失败':app:dexDebug' .....'完成非零退出值2

时间:2015-05-29 16:19:26

标签: android android-studio google-api dependencies

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

  

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

我读了一些建议我尝试了所有这些,但我仍然不能解决问题.Plz帮助

此处依赖项 - >

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')

}

1 个答案:

答案 0 :(得分:0)

  1. 删除一个Parse.jar(Android工作室不知道更喜欢哪个版本)

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

  3. 而不是

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

    由于google服务包含res文件,因此无法仅通过.jar

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