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

简介: 3个错误non-zero exit value 1; non-zero exit value 2; non-zero exit value 3Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

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](http://lib.csdn.net/base/javase)\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)。

dexOptions { javaMaxHeapSize "4g"}
如图:

相关文章
【错误记录】Tinker 热修复示例运行报错 ( Execution failed for task ‘:app:tinkerProcessD‘ . tinkerId is not set!!! )
【错误记录】Tinker 热修复示例运行报错 ( Execution failed for task ‘:app:tinkerProcessD‘ . tinkerId is not set!!! )
245 0
【错误记录】Tinker 热修复示例运行报错 ( Execution failed for task ‘:app:tinkerProcessD‘ . tinkerId is not set!!! )
|
20天前
Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicit
Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicit
23 0
|
4月前
|
资源调度 前端开发 Java
React Native 运行报错 Command failed_ gradlew.bat app_installDebug -PreactNativeDevServerPort=8081
React Native 运行报错 Command failed_ gradlew.bat app_installDebug -PreactNativeDevServerPort=8081
|
8月前
|
Android开发
Android Execution failed for task ‘:app:mergeDebugAssets‘. > java.nio.file.AccessDeniedException:错误
Android Execution failed for task ‘:app:mergeDebugAssets‘. > java.nio.file.AccessDeniedException:错误
57 0
|
Android开发
uniapp android 打包报错:Execution failed for task ‘:app:checkReleaseDuplicateClasses‘.
uniapp android 打包报错:Execution failed for task ‘:app:checkReleaseDuplicateClasses‘.
631 0
uniapp android 打包报错:Execution failed for task ‘:app:checkReleaseDuplicateClasses‘.
Appium问题解决方案(9)- Original error: Failed to launch Appium Settings app: Condition unmet after 5090 ms
Appium问题解决方案(9)- Original error: Failed to launch Appium Settings app: Condition unmet after 5090 ms
346 0
Appium问题解决方案(9)- Original error: Failed to launch Appium Settings app: Condition unmet after 5090 ms
|
测试技术
gradle编译出错:Execution failed for task ':app:compileTestDebugJava'
版权声明:本文为博主原创文章,转载请标明出处。 https://blog.csdn.net/chaoyu168/article/details/50012843 随着更新gradle到1.12,出现问题。
1069 0
|
Android开发
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.C
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.C
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.C
|
Android开发
开发过程中遇到的问题Error:Execution failed for task ':app:processDebugManifest'
开发过程中遇到的问题Error:Execution failed for task ':app:processDebugManifest'
267 0
开发过程中遇到的问题Error:Execution failed for task ':app:processDebugManifest'
|
26天前
|
API 数据安全/隐私保护 iOS开发
利用uni-app 开发的iOS app 发布到App Store全流程
利用uni-app 开发的iOS app 发布到App Store全流程
83 3

热门文章

最新文章