在Android上为Google Docs使用GData API时获得神秘的NoClassDefFound异常

时间:2011-11-30 02:59:25

标签: java android gdata

导致错误的代码行是:

    client = new DocsService("company-product-v1");

这是错误:

11-29 21:50:47.750: ERROR/AndroidRuntime(585): FATAL EXCEPTION: main
11-29 21:50:47.750: ERROR/AndroidRuntime(585): java.lang.ExceptionInInitializerError
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at edu.geneseo.dem1.doclocker.FileManager.saveImage(FileManager.java:252)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at edu.geneseo.dem1.doclocker.CameraActivity.onActivityResult(CameraActivity.java:125)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at android.app.Activity.dispatchActivityResult(Activity.java:3908)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at android.app.ActivityThread.deliverResults(ActivityThread.java:2528)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at android.app.ActivityThread.handleSendResult(ActivityThread.java:2574)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at android.app.ActivityThread.access$2000(ActivityThread.java:117)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:961)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at android.os.Looper.loop(Looper.java:130)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at android.app.ActivityThread.main(ActivityThread.java:3683)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at java.lang.reflect.Method.invokeNative(Native Method)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at java.lang.reflect.Method.invoke(Method.java:507)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at dalvik.system.NativeStart.main(Native Method)
11-29 21:50:47.750: ERROR/AndroidRuntime(585): Caused by: java.lang.NoClassDefFoundError: com.google.gdata.data.media.MediaSource
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at com.google.gdata.wireformats.input.media.MediaParser.<init>(MediaParser.java:39)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     at com.google.gdata.client.media.MediaService.<clinit>(MediaService.java:107)
11-29 21:50:47.750: ERROR/AndroidRuntime(585):     ... 15 more

问题似乎是我错过了MediaSource类,但我已经在我的项目中包含了gdata-media-1.0.jar。这些都是我所包含的罐子:

  • GDATA碱基1.0.jar
  • GDATA-客户1.0.jar
  • GDATA核-1.0.jar
  • GDATA-文档-3.0.jar
  • GDATA媒体-1.0.jar
  • 番石榴r09.jar
  • 的mail.jar

0 个答案:

没有答案