无法执行DEX:多DEX文件定义Lorg /阿帕奇/和谐/ AWT /内部/ NLS /消息
我开发使用droidtext生成一个PDF并且将其作为与电子邮件附件而不调用电子邮件客户端一个Android应用程序。
I am developing a android application which generates a PDF using droidtext and sends it as attachment with the email without invoking the email client.
我使用 droidtext 并的 Java邮件API 实现this.And我的lib目录如下。 8 !!最低SDK版本
I am using droidtext and java mail api to achieve this.And my lib directory is as follows. Minimum SDK version of 8 !!
需要的activation.jar,additionnal.jar和mail.jar中的电子邮件和需要生成PDF droidtext.jar。当我运行应用程序,我得到误差
activation.jar, additionnal.jar and mail.jar are required for email and droidtext.jar is required for generating pdf. when I run the application I get error as
[2013-08-11 21:09:04 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/apache/harmony/awt/internal/nls/Messages;
[2013-08-11 21:09:04 - SuperResume] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/apache/harmony/awt/internal/nls/Messages;
其分辨率任何建议??
Any suggestion for its resolution ??
这是因为一些AWT依赖类的additionnal.jar和droidText.0.5.jar定义。解决这个问题的最简单方法是有问题的包中的两个库的一个重命名。
This happens because some of the awt dependency classes are defined in additionnal.jar and droidText.0.5.jar. The easiest way to fix this is to rename the offending package in one of the two libraries.
例如。退房droidtext由于Android库项目如下所述: https://开头code.google.com/p/droidtext/wiki/GettingStarted 然后重构/的org.apache.harmony包重命名为一些不同的名称
E.g. check out droidtext as Android library project as described here: https://code.google.com/p/droidtext/wiki/GettingStarted and then refactor/rename the org.apache.harmony package to some different name