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包),我的这个是因为微信的包冲突了。


即可解决。

更多相关文章

  1. 【学习Android遇到的错误】关于Unable to instantiate activity
  2. 【android错误收集】android.view.InflateException
  3. android个人错误,持续更新
  4. NestedScrollView+RecyclerView滑动冲突问题,加载更多
  5. android 捕捉app错误信息
  6. Android studio 常见错误以及问题
  7. Android Studio3.0 Error:Execution failed for task ':app:java
  8. android中操作SQLite常见错误
  9. Unable to execute dex: Multiple dex files define Lcom/jayway

随机推荐

  1. 【Android】跑马灯效果(文字滚动)
  2. android里面EditTex多行输入及输入置顶问
  3. Android空间EditText的InputType属性
  4. Android(安卓)界面中隐藏项目名称
  5. Android设置颜色的几种方法
  6. android GestureDetector 基于webview的
  7. 布局属性
  8. 图解Android(安卓)- Android(安卓)GUI 系
  9. 安卓-关于EditText的那些事......
  10. Android(安卓)与web的相互调用