Android中使用java mail 1.4.1的lib发邮件时出现该问题,
Could not find class 'javax.activation.DataHandler', referenced from method javax.mail.internet.MimeMessage.getDataHandler
Could not find class 'javax.activation.DataHandler', referenced from method javax.mail.internet.MimeMessage.setContent
Could not find class 'javax.activation.DataHandler', referenced from method javax.mail.internet.MimeMessage.setContent
Could not find class 'javax.activation.DataHandler', referenced from method javax.mail.internet.MimeMessage.updateHeaders
Could not find class 'javax.mail.MultipartDataSource', referenced from method javax.mail.internet.MimeMultipart.<init>
Could not find class 'javax.activation.FileDataSource', referenced from method javax.mail.internet.MimeBodyPart.attachFile
Could not find class 'javax.activation.DataHandler', referenced from method javax.mail.internet.MimeBodyPart.getDataHandler
Could not find class 'javax.activation.DataHandler', referenced from method javax.mail.internet.MimeBodyPart.setContent
Could not find class 'javax.activation.DataHandler', referenced from method javax.mail.internet.MimeBodyPart.setContent
Could not find class 'javax.activation.DataHandler', referenced from method javax.mail.internet.MimeBodyPart.updateHeaders
解决方法:
在android工程lib目录下放入additionnal.jar , activation.jar ,mail.jar
下载地址:https://code.google.com/p/javamail-android/downloads/list
下载不下来的到这里下载:http://download.youkuaiyun.com/detail/weizi4332/7054871
本文解决在Android应用中使用JavaMail 1.4.1库发送邮件时遇到的类未找到错误,提供了所需的jar文件及下载链接。
879

被折叠的 条评论
为什么被折叠?



