Office Editor For Android 的问题

BlackieChan 发布于 2012/09/21 10:37
阅读 1K+
收藏 0

利用 POI 解析PPT获取每一页的所有元素,通过slide.getShapes();

异常:

09-21 10:06:51.389: E/AndroidRuntime(19890): FATAL EXCEPTION: main

09-21 10:06:51.389: E/AndroidRuntime(19890): java.lang.ExceptionInInitializerError

09-21 10:06:51.389: E/AndroidRuntime(19890): at org.apache.poi.hslf.model.ShapeFactory.createSimpeShape(ShapeFactory.java:118)

09-21 10:06:51.389: E/AndroidRuntime(19890): at org.apache.poi.hslf.model.ShapeFactory.createShape(ShapeFactory.java:44)

09-21 10:06:51.389: E/AndroidRuntime(19890): at org.apache.poi.hslf.model.Sheet.getShapes(Sheet.java:230)

09-21 10:06:51.389: E/AndroidRuntime(19890): at com.android.office.utils.PointClass.pptParse(PointClass.java:295)

09-21 10:06:51.389: E/AndroidRuntime(19890): at com.android.office.PointActivity.onCreate(PointActivity.java:45)

09-21 10:06:51.389: E/AndroidRuntime(19890): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)

09-21 10:06:51.389: E/AndroidRuntime(19890): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1673)

09-21 10:06:51.389: E/AndroidRuntime(19890): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1734)

09-21 10:06:51.389: E/AndroidRuntime(19890): at android.app.ActivityThread.access$1500(ActivityThread.java:124)

09-21 10:06:51.389: E/AndroidRuntime(19890): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:972)

09-21 10:06:51.389: E/AndroidRuntime(19890): at android.os.Handler.dispatchMessage(Handler.java:99)

09-21 10:06:51.389: E/AndroidRuntime(19890): at android.os.Looper.loop(Looper.java:130)

09-21 10:06:51.389: E/AndroidRuntime(19890): at android.app.ActivityThread.main(ActivityThread.java:3859)

09-21 10:06:51.389: E/AndroidRuntime(19890): at java.lang.reflect.Method.invokeNative(Native Method)

09-21 10:06:51.389: E/AndroidRuntime(19890): at java.lang.reflect.Method.invoke(Method.java:507)

09-21 10:06:51.389: E/AndroidRuntime(19890): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)

09-21 10:06:51.389: E/AndroidRuntime(19890): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)

09-21 10:06:51.389: E/AndroidRuntime(19890): at dalvik.system.NativeStart.main(Native Method)

09-21 10:06:51.389: E/AndroidRuntime(19890): Caused by: java.lang.NoClassDefFoundError: java.awt.font.FontRenderContext

09-21 10:06:51.389: E/AndroidRuntime(19890): at org.apache.poi.hslf.model.TextShape.<clinit>(TextShape.java:103)

09-21 10:06:51.389: E/AndroidRuntime(19890): ... 18 more


请问,该异常应该如何处理,是否是因为在Android环境下POI的某些方法比如slide.getShapes()是不可行的。

  • 有没有哪位朋友有过利用POI写过类似解析Office文档的经验,感谢能够分享下所得。
  • 或者,我想要 ‘分别’ 取得PPT每一页中所包含的图片该如何办?!
了解的朋友们希望畅所欲言...

加载中
返回顶部
顶部