3
votes

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!

1
Are you not getting any other error messages? - shiladitya
you are well within 65k limit ? or are you using any large libraries - Ramesh

1 Answers

0
votes

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