任务':transformClassesWithDexForDebug'的执行失败 [英] Execution failed for task ':transformClassesWithDexForDebug'
问题描述
我已经迁移到Android Studio 2.0 Preview,无论我做什么,我都会得到的:
I've migrated to Android Studio 2.0 Preview and I'm getting, no matter what I do, :
错误:任务':transformClassesWithDexForDebug'的执行失败.
Error:Execution failed for task ':transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:处理命令 'C:\ jdk7 \ bin \ java.exe''的退出值非零2
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!
推荐答案
在build.gradle脚本中,将dexOptions.javaMaxHeapSize配置设置为所需的任何值:
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
}
这篇关于任务':transformClassesWithDexForDebug'的执行失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!