0

When I try to run my app I get this Error:

Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

if I try use jdk1.7

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_45\bin\java.exe'' finished with non-zero exit value 2

thanks for help

Thiago
  • 12,778
  • 14
  • 93
  • 110
  • 1
    It seems like you're compiling more than once the same library and there is a package conflict. – yugidroid Jul 14 '15 at 16:37
  • 1
    [The answer to this StackOverflow question](http://stackoverflow.com/questions/21674091/how-to-add-stacktrace-or-debug-option-when-building-android-studio-project) shows you how to get more information out of the build to explain what went wrong. The current output isn't very useful. – Peter Ledbrook Jul 14 '15 at 16:58

1 Answers1

0

You should use Java 7. But you can use retrolambda for lambda.

mbmc
  • 5,024
  • 5
  • 25
  • 53