如何解决以下Log cat Error

时间:2012-02-16 18:24:10

标签: android

我创建发送电子邮件的peoject。但是当我运行它时,它会运行但是当我点击发送
时 按钮显示“发送应用程序已停止”并在LogCat中显示错误 Log cat错误如下。
请告诉我项目有什么问题。

02-16 23:33:51.162: D/dalvikvm(587): Not late-enabling CheckJNI (already on)
02-16 23:33:53.511: D/gralloc_goldfish(587): Emulator without GPU emulation detected.
02-16 23:33:57.772: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:57.772: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:57.801: E/dalvikvm(587): Could not find class 'javax.activation.DataHandler', referenced from method san.sendmail.improsys.GMailSender.sendMail
02-16 23:33:57.801: W/dalvikvm(587): VFY: unable to resolve new-instance 351 (Ljavax/activation/DataHandler;) in Lsan/sendmail/improsys/GMailSender;
02-16 23:33:57.813: D/dalvikvm(587): VFY: replacing opcode 0x22 at 0x0008
02-16 23:33:57.852: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:57.852: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:57.871: D/dalvikvm(587): DexOpt: unable to opt direct call 0x06d7 at 0x15 in Lsan/sendmail/improsys/GMailSender;.sendMail
02-16 23:33:57.962: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:57.962: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:57.962: W/dalvikvm(587): VFY: unable to find class referenced in signature (Ljavax/activation/DataHandler;)
02-16 23:33:57.981: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:57.992: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:57.992: I/dalvikvm(587): Could not find method javax.activation.DataHandler.getContent, referenced from method javax.mail.internet.MimeMessage.getContent
02-16 23:33:57.992: W/dalvikvm(587): VFY: unable to resolve virtual method 1760: Ljavax/activation/DataHandler;.getContent ()Ljava/lang/Object;
02-16 23:33:57.992: D/dalvikvm(587): VFY: replacing opcode 0x6e at 0x0004
02-16 23:33:58.012: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:58.012: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:58.023: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:58.023: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:58.023: E/dalvikvm(587): Could not find class 'javax.activation.DataHandler', referenced from method javax.mail.internet.MimeMessage.getDataHandler
02-16 23:33:58.032: W/dalvikvm(587): VFY: unable to resolve new-instance 351 (Ljavax/activation/DataHandler;) in Ljavax/mail/internet/MimeMessage;
02-16 23:33:58.032: D/dalvikvm(587): VFY: replacing opcode 0x22 at 0x0005
02-16 23:33:58.042: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:58.042: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:58.051: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:58.051: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:58.051: W/dalvikvm(587): VFY: unable to find class referenced in signature (Ljavax/activation/DataHandler;)
02-16 23:33:58.071: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:58.071: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:58.071: W/dalvikvm(587): VFY: unable to find class referenced in signature (Ljavax/activation/DataHandler;)
02-16 23:33:58.082: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:58.082: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:58.082: I/dalvikvm(587): Could not find method javax.activation.DataHandler.getInputStream, referenced from method javax.mail.internet.MimeMessage.getInputStream
02-16 23:33:58.082: W/dalvikvm(587): VFY: unable to resolve virtual method 1764: Ljavax/activation/DataHandler;.getInputStream ()Ljava/io/InputStream;
02-16 23:33:58.082: D/dalvikvm(587): VFY: replacing opcode 0x6e at 0x0004
02-16 23:33:58.124: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:58.124: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:58.124: E/dalvikvm(587): Could not find class 'javax.activation.DataHandler', referenced from method javax.mail.internet.MimeMessage.setContent
02-16 23:33:58.124: W/dalvikvm(587): VFY: unable to resolve new-instance 351 (Ljavax/activation/DataHandler;) in Ljavax/mail/internet/MimeMessage;
02-16 23:33:58.133: D/dalvikvm(587): VFY: replacing opcode 0x22 at 0x0000
02-16 23:33:58.133: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:58.133: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:58.142: E/dalvikvm(587): Could not find class 'javax.activation.DataHandler', referenced from method javax.mail.internet.MimeMessage.setContent
02-16 23:33:58.142: W/dalvikvm(587): VFY: unable to resolve new-instance 351 (Ljavax/activation/DataHandler;) in Ljavax/mail/internet/MimeMessage;
02-16 23:33:58.142: D/dalvikvm(587): VFY: replacing opcode 0x22 at 0x0000
02-16 23:33:58.151: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:58.151: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:58.162: W/dalvikvm(587): VFY: unable to find class referenced in signature (Ljavax/activation/DataHandler;)
02-16 23:33:58.182: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:58.182: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:58.271: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:58.271: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:58.281: D/dalvikvm(587): DexOpt: unable to opt direct call 0x06d7 at 0x0c in Ljavax/mail/internet/MimeMessage;.getDataHandler
02-16 23:33:58.293: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:58.293: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:58.293: D/dalvikvm(587): DexOpt: unable to opt direct call 0x06d5 at 0x02 in Ljavax/mail/internet/MimeMessage;.setContent
02-16 23:33:58.311: I/dalvikvm(587): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:33:58.311: W/dalvikvm(587): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:33:58.323: D/dalvikvm(587): DexOpt: unable to opt direct call 0x06d5 at 0x06 in Ljavax/mail/internet/MimeMessage;.setContent
02-16 23:33:58.363: D/AndroidRuntime(587): Shutting down VM
02-16 23:33:58.363: W/dalvikvm(587): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
02-16 23:33:58.391: E/AndroidRuntime(587): FATAL EXCEPTION: main
02-16 23:33:58.391: E/AndroidRuntime(587): java.lang.NoClassDefFoundError: javax.activation.DataHandler
02-16 23:33:58.391: E/AndroidRuntime(587):  at san.sendmail.improsys.GMailSender.sendMail(GMailSender.java:53)
02-16 23:33:58.391: E/AndroidRuntime(587):  at san.sendmail.improsys.MailSenderActivity$1.onClick(MailSenderActivity.java:25)
02-16 23:33:58.391: E/AndroidRuntime(587):  at android.view.View.performClick(View.java:3511)
02-16 23:33:58.391: E/AndroidRuntime(587):  at android.view.View$PerformClick.run(View.java:14105)
02-16 23:33:58.391: E/AndroidRuntime(587):  at android.os.Handler.handleCallback(Handler.java:605)
02-16 23:33:58.391: E/AndroidRuntime(587):  at android.os.Handler.dispatchMessage(Handler.java:92)
02-16 23:33:58.391: E/AndroidRuntime(587):  at android.os.Looper.loop(Looper.java:137)
02-16 23:33:58.391: E/AndroidRuntime(587):  at android.app.ActivityThread.main(ActivityThread.java:4424)
02-16 23:33:58.391: E/AndroidRuntime(587):  at java.lang.reflect.Method.invokeNative(Native Method)
02-16 23:33:58.391: E/AndroidRuntime(587):  at java.lang.reflect.Method.invoke(Method.java:511)
02-16 23:33:58.391: E/AndroidRuntime(587):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-16 23:33:58.391: E/AndroidRuntime(587):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-16 23:33:58.391: E/AndroidRuntime(587):  at dalvik.system.NativeStart.main(Native Method)
02-16 23:34:10.491: I/Process(587): Sending signal. PID: 587 SIG: 9
02-16 23:37:58.423: D/gralloc_goldfish(665): Emulator without GPU emulation detected.
02-16 23:38:36.581: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.581: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.581: E/dalvikvm(665): Could not find class 'javax.activation.DataHandler', referenced from method san.sendmail.improsys.GMailSender.sendMail
02-16 23:38:36.621: W/dalvikvm(665): VFY: unable to resolve new-instance 351 (Ljavax/activation/DataHandler;) in Lsan/sendmail/improsys/GMailSender;
02-16 23:38:36.621: D/dalvikvm(665): VFY: replacing opcode 0x22 at 0x0008
02-16 23:38:36.642: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.642: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.662: D/dalvikvm(665): DexOpt: unable to opt direct call 0x06d7 at 0x15 in Lsan/sendmail/improsys/GMailSender;.sendMail
02-16 23:38:36.732: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.742: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.742: W/dalvikvm(665): VFY: unable to find class referenced in signature (Ljavax/activation/DataHandler;)
02-16 23:38:36.742: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.742: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.742: I/dalvikvm(665): Could not find method javax.activation.DataHandler.getContent, referenced from method javax.mail.internet.MimeMessage.getContent
02-16 23:38:36.742: W/dalvikvm(665): VFY: unable to resolve virtual method 1760: Ljavax/activation/DataHandler;.getContent ()Ljava/lang/Object;
02-16 23:38:36.742: D/dalvikvm(665): VFY: replacing opcode 0x6e at 0x0004
02-16 23:38:36.762: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.762: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.782: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.782: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.782: E/dalvikvm(665): Could not find class 'javax.activation.DataHandler', referenced from method javax.mail.internet.MimeMessage.getDataHandler
02-16 23:38:36.782: W/dalvikvm(665): VFY: unable to resolve new-instance 351 (Ljavax/activation/DataHandler;) in Ljavax/mail/internet/MimeMessage;
02-16 23:38:36.782: D/dalvikvm(665): VFY: replacing opcode 0x22 at 0x0005
02-16 23:38:36.793: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.793: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.793: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.793: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.802: W/dalvikvm(665): VFY: unable to find class referenced in signature (Ljavax/activation/DataHandler;)
02-16 23:38:36.802: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.813: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.813: W/dalvikvm(665): VFY: unable to find class referenced in signature (Ljavax/activation/DataHandler;)
02-16 23:38:36.813: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.813: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.813: I/dalvikvm(665): Could not find method javax.activation.DataHandler.getInputStream, referenced from method javax.mail.internet.MimeMessage.getInputStream
02-16 23:38:36.813: W/dalvikvm(665): VFY: unable to resolve virtual method 1764: Ljavax/activation/DataHandler;.getInputStream ()Ljava/io/InputStream;
02-16 23:38:36.813: D/dalvikvm(665): VFY: replacing opcode 0x6e at 0x0004
02-16 23:38:36.832: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.832: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.832: E/dalvikvm(665): Could not find class 'javax.activation.DataHandler', referenced from method javax.mail.internet.MimeMessage.setContent
02-16 23:38:36.832: W/dalvikvm(665): VFY: unable to resolve new-instance 351 (Ljavax/activation/DataHandler;) in Ljavax/mail/internet/MimeMessage;
02-16 23:38:36.832: D/dalvikvm(665): VFY: replacing opcode 0x22 at 0x0000
02-16 23:38:36.842: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.842: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.842: E/dalvikvm(665): Could not find class 'javax.activation.DataHandler', referenced from method javax.mail.internet.MimeMessage.setContent
02-16 23:38:36.842: W/dalvikvm(665): VFY: unable to resolve new-instance 351 (Ljavax/activation/DataHandler;) in Ljavax/mail/internet/MimeMessage;
02-16 23:38:36.842: D/dalvikvm(665): VFY: replacing opcode 0x22 at 0x0000
02-16 23:38:36.852: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.852: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.852: W/dalvikvm(665): VFY: unable to find class referenced in signature (Ljavax/activation/DataHandler;)
02-16 23:38:36.852: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.852: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.892: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.892: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.892: D/dalvikvm(665): DexOpt: unable to opt direct call 0x06d7 at 0x0c in Ljavax/mail/internet/MimeMessage;.getDataHandler
02-16 23:38:36.892: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.892: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.902: D/dalvikvm(665): DexOpt: unable to opt direct call 0x06d5 at 0x02 in Ljavax/mail/internet/MimeMessage;.setContent
02-16 23:38:36.902: I/dalvikvm(665): Failed resolving Ljavax/activation/DataHandler; interface 176 'Ljava/awt/datatransfer/Transferable;'
02-16 23:38:36.902: W/dalvikvm(665): Link of class 'Ljavax/activation/DataHandler;' failed
02-16 23:38:36.902: D/dalvikvm(665): DexOpt: unable to opt direct call 0x06d5 at 0x06 in Ljavax/mail/internet/MimeMessage;.setContent
02-16 23:38:36.933: D/AndroidRuntime(665): Shutting down VM
02-16 23:38:36.933: W/dalvikvm(665): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
02-16 23:38:36.951: E/AndroidRuntime(665): FATAL EXCEPTION: main
02-16 23:38:36.951: E/AndroidRuntime(665): java.lang.NoClassDefFoundError: javax.activation.DataHandler
02-16 23:38:36.951: E/AndroidRuntime(665):  at san.sendmail.improsys.GMailSender.sendMail(GMailSender.java:53)
02-16 23:38:36.951: E/AndroidRuntime(665):  at san.sendmail.improsys.MailSenderActivity$1.onClick(MailSenderActivity.java:25)
02-16 23:38:36.951: E/AndroidRuntime(665):  at android.view.View.performClick(View.java:3511)
02-16 23:38:36.951: E/AndroidRuntime(665):  at android.view.View$PerformClick.run(View.java:14105)
02-16 23:38:36.951: E/AndroidRuntime(665):  at android.os.Handler.handleCallback(Handler.java:605)
02-16 23:38:36.951: E/AndroidRuntime(665):  at android.os.Handler.dispatchMessage(Handler.java:92)
02-16 23:38:36.951: E/AndroidRuntime(665):  at android.os.Looper.loop(Looper.java:137)
02-16 23:38:36.951: E/AndroidRuntime(665):  at android.app.ActivityThread.main(ActivityThread.java:4424)
02-16 23:38:36.951: E/AndroidRuntime(665):  at java.lang.reflect.Method.invokeNative(Native Method)
02-16 23:38:36.951: E/AndroidRuntime(665):  at java.lang.reflect.Method.invoke(Method.java:511)
02-16 23:38:36.951: E/AndroidRuntime(665):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-16 23:38:36.951: E/AndroidRuntime(665):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-16 23:38:36.951: E/AndroidRuntime(665):  at dalvik.system.NativeStart.main(Native Method)

2 个答案:

答案 0 :(得分:0)

您可能想要检查项目设置/定义 - 它尝试加载javax.activation.DataHandler类,该类不是SDK的一部分。这是你的意图吗?

答案 1 :(得分:0)

问题在于,并非所有在Java中都能正常工作的类都可以在Android上运行,因为它首先必须转换为Dalvik接受的格式,即Android的JVM变体。所以,一些类(例如属于javax。*,方面等的类......)将不会“可翻译”并且将失败。请考虑仅使用Android VM接受的最小类集。