路标和gdata jar出现多个dex文件错误 [英] Multiple dex files error with signpost and gdata jars
本文介绍了路标和gdata jar出现多个dex文件错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的应用同时需要 signpost-core-1.2.1.2.jar
和Google的其中一个库 gdata-core-1.0.jar
。但是路标jar有一些打包在gdata-core包中的类。因此,我的应用程序项目没有建立。错误如下:
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;
如何解决此冲突。我需要在我的应用中同时使用这两个jar。
How can I fix this conflict.. I need both the jars for different purposes within my app.
推荐答案
您仍然可以保留两个jar,但是您需要修改/重新打包其中一个以解决运行时冲突
You can still keep two jars, but you would need to modify / repackage one of them to resolve runtime conflicts
- 您需要确定将用于该冲突类的jar
- 用7zip打开其中一个jar(或另一种选择),然后删除路径toConflict.class文件
- 保存新的jar
- 更新类路径以在IDE中包含新的jar
- 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
这篇关于路标和gdata jar出现多个dex文件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文