错误:执行失败的任务“:应用程序:dexDebug'......'非零退出值2结束 [英] Error:Execution failed for task ':app:dexDebug'.....' finished with non-zero exit value 2
问题描述
错误:执行失败的任务:应用程序:dexDebug
。
com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:过程'命令'C:\\ Program Files文件\\的Java \\ jdk1.7.0_75 \\斌\\ java.exe的'完成非零退出值2
块引用>我读了一些建议,我尝试所有的人,但是我就是不problem.Plz帮助
下面的依赖关系 - >
{相关性
编译文件树(导演:'库',包括:['的* .jar'])
编译com.android.support:appcompat-v7:22.1.1
编译文件(库/谷歌播放services.jar')
编译文件(库/解析-1.3.2.jar')
编译文件(库/解析-1.6.0.jar')}
解决方案
删除一个Parse.jar(Android的工作室不知道哪个版本preFER)
编译com.google.android.gms:发挥服务:7.5.0
而不是
编译文件(库/谷歌播放services.jar')
作为谷歌服务中包含资源文件,因此不能仅仅通过一个.jar进口
<醇开始=3>删除 编译文件树(导演:'库',包括:['的* .jar'])
你不想编译所有,究竟是在库<。 / LI>Error:Execution failed for task ':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'' finished with non-zero exit value 2
I read some suggestion i try all of them but still i can not the problem.Plz help
Here dependencies ->
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')
}
解决方案
remove one Parse.jar (Android studio does not know which version to prefer)
compile 'com.google.android.gms:play-services:7.5.0'
instead of
compile files('libs/google-play-services.jar')
as google services contain res files, therefore they cannot be imported only through a .jar
- remove
compile fileTree(dir: 'libs', include: ['*.jar'])
as you dont want to compile all, what is in libs.
这篇关于错误:执行失败的任务“:应用程序:dexDebug'......'非零退出值2结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!