3

I've migrated to Android Studio 2.0 Preview and I'm getting, no matter what I do, :

Error:Execution failed for task ':transformClassesWithDexForDebug'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\jdk7\bin\java.exe'' finished with non-zero exit value 2

Any help indeed much appreciated!

Alexander Kulyakhtin
  • 47,782
  • 38
  • 107
  • 158

1 Answers1

0

In your build.gradle script, set the dexOptions.javaMaxHeapSize configuration to whatever value you need:

android {
//snip
//add this into your existing 'android' block
  dexOptions {
    javaMaxHeapSize "4g"
  }
//snip
}

Source