任务':transformClassesWithDexForDebug'的执行失败 [英] Execution failed for task ':transformClassesWithDexForDebug'

查看:69
本文介绍了任务':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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆