简体   繁体   English

错误:任务执行失败:ExecException:进程'命令'C:\\ Program Files \\ Java \\ jdk1.7.0_79 \\ bin \\ java.exe''以非零退出值2结束

[英]Error:Execution failed for task: ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 2

Error:Execution failed for task ':app:preDexDebug'. 错误:任务':app:preDexDebug'的执行失败。

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\\Program Files\\Java\\jdk1.7.0_79\\bin\\java.exe'' finished with non-zero exit value 2 com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令'C:\\ Program Files \\ Java \\ jdk1.7.0_79 \\ bin \\ java.exe''以非完成零退出值2

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile files('poi-3.13-beta1-20150723.jar')
    compile 'com.android.support:appcompat-v7:22.2.1'
}

I finally crack the solution this error was occurring because my code was exceeding max-limit. 我终于破解了这个错误发生的解决方案,因为我的代码超过了max-limit。 I fount an useful link to solve this: https://developer.android.com/tools/building/multidex.html 我找到了一个有用的链接来解决这个问题: https//developer.android.com/tools/building/multidex.html

When you face this kind of problem like 'C:\\Program Files\\Java\\jdk1.7.0_79\\bin\\java.exe' finished with non-zero exit value 2 当你遇到像'C:\\ Program Files \\ Java \\ jdk1.7.0_79 \\ bin \\ java.exe'这样的问题时, 非零退出值2结束

It means you need to verify all the dependencies, manifests and the modules you have attached to the project. 这意味着您需要验证所有依赖项,清单和附加到项目的模块。 The problem is now due to any update or any of the reason their is some problem in any the file code 问题现在是由于任何更新或任何文件代码中的某些问题的原因

Possible reason:- 可能的原因: -

  • Minimum SDK version is too low 最低SDK版本太低
  • Any of resource file issue 任何资源文件问题
  • Any of manifest is showing any error 任何清单都显示任何错误
  • You declared multiple Launch Activity 您声明了多个Launch Activity
  • You may need to enable MultiDex now 您可能需要立即启用MultiDex

In short, just go through all files and try to find the issue with Project or Modules. 简而言之,只需浏览所有文件并尝试查找Project或Modules的问题。

Best approach : Clean Project, Rebuild Project, Synchronize and try to install application. 最佳方法:清理项目,重建项目,同步并尝试安装应用程序。

(Any of the above step may show you an error in any of your file which is actually causing this problem) (上述任何一步都可能会在您的任何文件中显示错误,实际上是导致此问题)

对我来说,当我删除/ app / libs文件夹中的jar文件时,它已经解决了,因为也在/app/buld.gradle中声明了

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误 Gradle Build C:\\Program Files\\Java\\jdk1.7.0_79\\bin\\java.exe'' 以非零退出值 1 结束 - Error Gradle Build C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 1 任务':app:dexDebug'的执行失败。进程'命令'C:\\ Program Files \\ Java \\ jdk1.8.0_45 \\ bin \\ java.exe''的退出值非零 - Execution failed for task ':app:dexDebug'.Process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe'' finished with non-zero exit value 2 Process 'command 'C:\Program Files\Java\jdk1.8.0_25\bin\java.exe'' 以非零退出值 2 完成 - Process 'command 'C:\Program Files\Java\jdk1.8.0_25\bin\java.exe'' finished with non-zero exit value 2 进程'命令'C:\\ Program Files \\ Java \\ jdk1.8.0_25 \\ bin \\ java.exe''以非零退出值1结束 - Process 'command 'C:\Program Files\Java\jdk1.8.0_25\bin\java.exe'' finished with non-zero exit value 1 com.android.dex.DexIndexOverflowException:错误:执行任务“…\\ Java \\ jdk1.7.0_17 \\ bin \\ java.exe”的执行失败,退出值非零2 - com.android.dex.DexIndexOverflowException: Error:Execution failed for task “…\Java\jdk1.7.0_17\bin\java.exe” finished with non-zero exit value 2 ':应用程序:dexDebug'。 gradle失败'C:\\ Program Files \\ Java \\ jdk1.7.0_51 \\ bin \\ java.exe''完成,退出值非零2 - ':app:dexDebug'. gradle failed 'C:\Program Files\Java\jdk1.7.0_51\bin\java.exe'' finished with non-zero exit value 2 Process 'command 'C:/Java/jdk8/bin/java.exe'' 以非零退出值 1 结束 - Process 'command 'C:/Java/jdk8/bin/java.exe'' finished with non-zero exit value 1 如何解决以非零退出值2完成的过程'命令'C:\\ Program Files \\ Java \\ jdk1.8.0_31 \\ bin \\ java.exe'' - How to solve Process 'command 'C:\Program Files\Java\jdk1.8.0_31\bin\java.exe'' finished with non-zero exit value 2 错误:任务':app:dexDebug'的执行失败。 进程'命令java.exe完成,退出值非零2 - Error:Execution failed for task ':app:dexDebug'. Process 'command java.exe finished with non-zero exit value 2 Android Studio:'C:\\ Program Files \\ Java \\ jdk1.8.0_51 \\ bin \\ java.exe''以非零退出值1结束 - Android Studio: 'C:\Program Files\Java\jdk1.8.0_51\bin\java.exe'' finished with non-zero exit value 1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM