当前位置:   article > 正文

Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决记录_failed for task ':app3:transformclasseswithdexford

failed for task ':app3:transformclasseswithdexfordebug

 

转载请标明出处: 

http://blog.csdn.net/lxk_1993/article/details/50511172

本文出自:【lxk_1993的博客】;   

 

新的排版地址 https://blog.csdn.net/lxk_1993/article/details/95475603

 

 

3个错误non-zero exit value 1; non-zero exit value 2; non-zero exit value 3

 

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 'F:\Program Files (x86)\Java\jdk1.8.0_31\bin\java.exe'' finished with non-zero exit value 1

 

 

这个是因为依赖包重复了 (像v4和nineoldandroids),如图。app中实现了对easeUI的依赖,但是app和easeUI都添加了对这个包的依赖。所以就报这个错误,修改之后再报,就clean,rebuild一下

 

 

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 'F:\Program Files (x86)\Java\jdk1.8.0_31\bin\java.exe'' finished withnon-zero exit value 2

 

这个错误在app的build.gradle里面添加下面这句就好了。

 

 
android { defaultConfig { ... multiDexEnabled true  } }

 

 

 

 

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 'F:\Program Files (x86)\Java\jdk1.8.0_31\bin\java.exe'' finished withnon-zero exit value 3

 

这个错误就在app.bulid里面加上这句,再rebuild ,之后再运行就行了。4g可以看电脑配置修改(2g,3g,6g,8g)。

 

  1. dexOptions {
  2. javaMaxHeapSize "4g"
  3. }

如图:

 

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/143312
推荐阅读
相关标签
  

闽ICP备14008679号