嗨,我在NoClassDefFoundError
添加activation.jar
、编译和运行时收到错误消息。
该类DataHandler
存在于activation.jar
注意:我在 android 项目中使用这个。
以下是我的错误:
06-25 15:19:22.237 10504-10611/?E/AndroidRuntime: FATAL EXCEPTION: Timer-0
java.lang.NoClassDefFoundError: javax.activation.DataHandler
at javax.mail.internet.MimeMessage.setContent(MimeMessage.java:1482)
at javax.mail.internet.MimeBodyPart.setText(MimeBodyPart.java:1066)
at javax.mail.internet.MimeMessage.setText(MimeMessage.java:1521)
at javax.mail.internet.MimeMessage.setText(MimeMessage.java:1505)
at com.corpus.application.channellist.ReminderAlarmService.notifyReminderListener(ReminderAlarmService.java:90)
at com.corpus.middleware.reminder.ReminderManager$2.run(ReminderManager.java:135)
at java.util.Timer$TimerImpl.run(Timer.java:284)