Multiple dex files error with signpost and gdata jars

别说谁变了你拦得住时间么 提交于 2019-12-11 20:25:36

问题


My app requires both signpost-core-1.2.1.2.jar and one of Google's libraries gdata-core-1.0.jar. But the signpost jar has some of the classes packaged in the gdata-core package. So, my app project is not building. Here is the error:

 Unable to execute dex: Multiple dex files define Lcom/google/gdata/util/common/base/Escaper;

How can I fix this conflict.. I need both the jars for different purposes within my app.


回答1:


You can still keep two jars, but you would need to modify / repackage one of them to resolve runtime conflicts

  • You need to decide what jar you will use for that conflicting class
  • Open one of jars with 7zip (or alternative) and remove the path\to\Conflict.class file
  • save the new jar
  • update classpath to include new jar in your IDE


来源:https://stackoverflow.com/questions/19645436/multiple-dex-files-error-with-signpost-and-gdata-jars

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!