问题描述
我想提出一个电子邮件发送应用程序在Android手机。对于我包括两个jar文件激活。罐
和的mail.jar
。但是,当我运行这个应用程序,并尝试发送邮件,我得到了下面的错误在 LogCat中
。
I am making a email sending application in android phone. For that I included two jar file activation. jar
and mail.jar
. But when I run this application and try to send the mail, I got following error on LogCat
.
java.lang.NoClassDefFoundError: javax.activation.DataHandler
我是新来的机器人。所以我无法弄清楚这个问题。请帮助我。谢谢
I am new to android. so I am not able to figure out this issue. please Help me. Thanks
推荐答案
有一个 Android的友好港你应该使用JavaMail 。有迹象表明,你需要包括在您的应用程序三个库:有mail.jar,activation.jar和additionnal.jar(原文如此)。它看起来像你缺少的东西,激活库依赖,这可能是因为你没有使用这个库的Android的端口。
There is an Android-friendly port of javamail which you should be using. There are three libraries that you need to include in your app: mail.jar, activation.jar, and additionnal.jar(sic). It looks like you are missing something that the activation library depends on, and this could be because you are not using the Android port of this library.
我已经使用的JavaMail了Android的版本成功的一个项目,它的作品真的很好。
I have used the Android-friendly version of javamail successfully in a project, and it works really well.
这篇关于java.lang.NoClassDefFoundError的:在的javax.activation.DataHandler机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!