[英]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:- 可能的原因: -
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.