使用库发送电子邮件时的NoClassDefFoundError:mysql-connector-java-5.0.8-bin

时间:2016-04-03 22:21:42

标签: android mysql email

当我尝试发送电子邮件时,我的Android应用程序中存在问题。如果我使用该库发送邮件(mail.jaractivation.jaradditionnal.jar)和连接器for android:mysql-connector-java-5.0.8-bin.jar会引发错误:

 java.lang.NoClassDefFoundError: com.example.timis.util.sendMails.Sendmail$1
at com.example.timis.util.sendMails.Sendmail.sendMail(Sendmail.java:31)
at com.example.timis.tour.LoginActivity.onCreate(LoginActivity.java:189)
at android.app.Activity.performCreate(Activity.java:5458)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2376)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2470)
at android.app.ActivityThread.access$900(ActivityThread.java:174)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1307)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5593)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)

如果删除mysql-connector-java-5.0.8-bin,则效果很好。

0 个答案:

没有答案