:app:dexDebug ExecException 以非零退出值 2 结束 [英] :app:dexDebug ExecException finished with non-zero exit value 2

查看:25
本文介绍了:app:dexDebug ExecException 以非零退出值 2 结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能帮我解决以下错误.当我清理项目时,它没有显示任何错误,但是每次我尝试运行时都会收到此消息.

Could anyone help me out with the following error. When i clean the project, it doesn't show any error but every time i try to run i get this message.

错误:任务:app:dexDebug"的执行失败.

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.8.0_45\bin\java.exe'' 完成非零退出值 2

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe'' finished with non-zero exit value 2

该应用程序运行时没有出现错误,但是当我的系统崩溃并重新启动 android studio 时,我几乎没有对 Android API 22 进行更新.更新后,应用程序不断向我显示此错误消息.我下载了 JDK 8 并尝试运行但没有成功.后来我在这个堆栈帖子之后降级到 JDK 7,但仍然没有修复它.是否可以使用 Java 8 进行 Android 开发?

The application was running with no errors but as my system crashed and restarted android studio i had few updates for Android API 22. After the update the application keep giving me this error message. I downloaded JDK 8 and tried to run but didn't work. Later i downgraded to JDK 7 after this stack post but still has not fixed it. Is it possible to use Java 8 for Android development?

我浏览了许多类似的问题,但没有一个对我有用.在堆栈中发现的一些类似问题是

I have looked through numerous similar question but none works for me. Some similar issues found on stack were

为什么 java.exe 退出android studio 中的值 1

错误:任务':app:dexDebug 执行失败'.>comcommand 以非零退出值 2 结束

Java 以非零退出值 2 结束- Android Gradle

java.exe以非零退出值 2 结束

进程'command' C:\Program Files\Java\jdk1.8.0_31\bin\java.exe''以非零退出值2结束

我查看了构建的 gradle 中的依赖项,看看是否有任何冲突,但没有发现.

I have looked through dependencies in gradle built to see if there were any conflict but found none.

我什至尝试将代码复制到一个新项目中并运行它,但仍然没有成功.任何遇到相同问题并解决的人请帮助我.

I even tried to copy the code into a new project and run it but still no success. Anyone who has faced the same issue and solved it please help me out.

推荐答案

经过几天的尝试终于可以解决这个问题.我的 .jar 文件之一的问题.我不得不取出每个罐子并一一检查,直到找到为止.我删除了 .jar 文件并清理了我的项目并成功运行.如果有人遇到类似问题,请一一检查您的 jar 文件.

After days of trying out finally could fix the issue. The problem with one of my .jar files. I had to remove each jar and check one by one until i found it. I removed the .jar file and cleaned my project and ran successfully. If any one should face similar issue check your jar file one by one.

这篇关于:app:dexDebug ExecException 以非零退出值 2 结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆