Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/lidroid/xutils/task/TaskHandler;

Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/lidroid/xutils/task/TaskHandler;

如果你用 Studio开发,并且要用其他项目作为library,这个问题是很容易出现的。出现这个问题的原因是包的重复引用,意思就是在你自己的项目中引用了某个包,而被你作为library的项目也引用了同一个包,就会有这个问题。

Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/lidroid/xutils/task/TaskHandler;

 

你可以直接修改gradle文件,也可以在上图中改,如下图所示:

在gradle文件中改,只需要将compile改成provided就行。

如果直接配置的话,也是一样的,在下拉框中选择provided。这里说明下,你只要改其中一个项目就可以了。

Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/lidroid/xutils/task/TaskHandler;

相关文章:

  • 2022-12-23
  • 2021-09-10
  • 2021-10-28
  • 2022-12-23
  • 2022-12-23
  • 2021-04-08
  • 2021-08-05
猜你喜欢
  • 2021-10-19
  • 2021-11-09
  • 2022-12-23
  • 2021-08-13
  • 2021-10-05
  • 2021-09-09
  • 2021-09-01
相关资源
相似解决方案