Reputation: 91
Error:Execution failed for task ':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
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('poi-3.13-beta1-20150723.jar')
compile 'com.android.support:appcompat-v7:22.2.1'
}
Upvotes: 4
Views: 7373
Reputation: 3070
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
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.
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)
Upvotes: 1
Reputation: 1482
For me, it was solved, when I deleted jar file in /app/libs folder, because library was also declared in /app/buld.gradle
Upvotes: 0
Reputation: 91
I finally crack the solution this error was occurring because my code was exceeding max-limit. I fount an useful link to solve this: https://developer.android.com/tools/building/multidex.html
Upvotes: 2