0

When I just built with Gradle, things worked fine. Then I chose "run" and this error happened:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

Would anyone know how to fix this one? I've never seen it before. It references Java7, but I am using Java6. How can I change this?

Genadinik
  • 18,153
  • 63
  • 185
  • 284

1 Answers1

1

At First set this in your build.gradle section .

 compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7 
}

Then Check ClassesWithDexForDebug Answer .

Community
  • 1
  • 1
IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198