Android Studio Error:Execution failed for task ':app:transformClassesWithDexForDebug' 解决办法
16lz
2021-01-23
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
上面的错误一般前面还有类似这个错误:
Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lcom/tencent/mm/a/a;
类似的说converting bytecode to dex的错误,然后下面这里说Multiple dex files ,说明已经有某个库了。
这个问题出现的原因是因为你的项目(如果有多个模块,就更容易出现这个问题)包含了同一个包。
删除掉其中一个即可(如果主项目和module有冲突,删除主项目的lib包),我的这个是因为微信的包冲突了。
即可解决。
更多相关文章
- 【学习Android遇到的错误】关于Unable to instantiate activity
- 【android错误收集】android.view.InflateException
- android个人错误,持续更新
- NestedScrollView+RecyclerView滑动冲突问题,加载更多
- android 捕捉app错误信息
- Android studio 常见错误以及问题
- Android Studio3.0 Error:Execution failed for task ':app:java
- android中操作SQLite常见错误
- Unable to execute dex: Multiple dex files define Lcom/jayway