1
我一直在嘗試在我的android應用程序中使用Sendgrid。這是我正在與其他3人合作的一個項目。該應用程序可在手機上和模擬器就好了,但它似乎總是在我的仿真器和手機死機與此錯誤消息NoClassDefFoundError異常Android應用程序
05-07 03:15:12.940: W/EGL_emulation(1336): eglSurfaceAttrib not implemented
05-07 03:15:13.510: D/onDestroy(1336): 2014-05-07 03:15:11
05-07 03:15:13.700: D/dalvikvm(1336): GC_CONCURRENT freed 338K, 33% free 3276K/4820K, paused 5ms+4ms, total 65ms
05-07 03:15:13.790: E/dalvikvm(1336): Could not find class 'com.github.sendgrid.SendGrid', referenced from method edu.upenn.capsproject.SurveyActivity$SendEmailWithSendGrid.doInBackground
05-07 03:15:13.790: W/dalvikvm(1336): VFY: unable to resolve new-instance 744 (Lcom/github/sendgrid/SendGrid;) in Ledu/upenn/capsproject/SurveyActivity$SendEmailWithSendGrid;
05-07 03:15:13.790: D/dalvikvm(1336): VFY: replacing opcode 0x22 at 0x0001
05-07 03:15:13.790: D/dalvikvm(1336): DexOpt: unable to opt direct call 0x1505 at 0x07 in Ledu/upenn/capsproject/SurveyActivity$SendEmailWithSendGrid;.doInBackground
05-07 03:15:13.800: W/dalvikvm(1336): threadid=11: thread exiting with uncaught exception (group=0x40a71930)
05-07 03:15:13.810: E/AndroidRuntime(1336): FATAL EXCEPTION: AsyncTask #1
05-07 03:15:13.810: E/AndroidRuntime(1336): java.lang.RuntimeException: An error occured while executing doInBackground()
05-07 03:15:13.810: E/AndroidRuntime(1336): at android.os.AsyncTask$3.done(AsyncTask.java:299)
05-07 03:15:13.810: E/AndroidRuntime(1336): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
05-07 03:15:13.810: E/AndroidRuntime(1336): at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
05-07 03:15:13.810: E/AndroidRuntime(1336): at java.util.concurrent.FutureTask.run(FutureTask.java:239)
05-07 03:15:13.810: E/AndroidRuntime(1336): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
05-07 03:15:13.810: E/AndroidRuntime(1336): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
05-07 03:15:13.810: E/AndroidRuntime(1336): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
05-07 03:15:13.810: E/AndroidRuntime(1336): at java.lang.Thread.run(Thread.java:856)
05-07 03:15:13.810: E/AndroidRuntime(1336): Caused by: java.lang.NoClassDefFoundError: com.github.sendgrid.SendGrid
05-07 03:15:13.810: E/AndroidRuntime(1336): at edu.upenn.capsproject.SurveyActivity$SendEmailWithSendGrid.doInBackground(SurveyActivity.java:368)
05-07 03:15:13.810: E/AndroidRuntime(1336): at edu.upenn.capsproject.SurveyActivity$SendEmailWithSendGrid.doInBackground(SurveyActivity.java:1)
05-07 03:15:13.810: E/AndroidRuntime(1336): at android.os.AsyncTask$2.call(AsyncTask.java:287)
05-07 03:15:13.810: E/AndroidRuntime(1336): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
05-07 03:15:13.810: E/AndroidRuntime(1336): ... 4 more
05-07 03:15:15.219: W/EGL_emulation(1336): eglSurfaceAttrib not implemented
05-07 03:15:16.289: I/Process(1336): Sending signal. PID: 1336 SIG: 9
05-07 03:15:16.750: E/Trace(1362): error opening trace file: No such file or directory (2)
我有sendgrid-0.2.0-jar.jar.zip文件中的引用庫路徑。
看看這個[在Android中使用外部jar](http://stackoverflow.com/questions/1334802/how-can-i-use-external-jars-in-an-android-project) –
我試過大部分已經。不幸的是,最高票數的答案沒有奏效。 – CPride
可能的美滿 - http://stackoverflow.com/questions/2247998/noclassdeffounderror-eclipse-and-android – Hulk