Android上的Jets3t

时间:2010-04-27 06:49:23

标签: android jets3t

我正在尝试在Android应用程序中使用Jets3t库,并且在使用库时我一直在使用Rest服务时出错。

04-27 16:47:39.491: ERROR/S3Service(225): Couldn't initialize a sax driver for the XMLReader

我试图包含Xerces库和Crimson库,但它不能很好地运行。我收到这个错误:

Attempt to include a core class (java.* or javax.*) in something other
than a core library. It is likely that you have attempted to include
in an application the core library (or a part thereof) from a desktop
virtual machine. This will most assuredly not work. At a minimum, it
jeopardizes the compatibility of your app with future versions of the
platform. It is also often of questionable legality.

If you really intend to build a core library -- which is only
appropriate as part of creating a full virtual machine distribution,
as opposed to compiling an application -- then use the
"--core-library" option to suppress this error message.

我能做些什么让它发挥作用吗?

1 个答案:

答案 0 :(得分:4)

显然,您可以通过设置以下系统属性来解决SAX驱动程序问题:

System.setProperty("org.xml.sax.driver", "org.xmlpull.v1.sax2.Driver");

这个答案可以归功于JetS3t用户论坛上的Bruno Hautzenberger: http://groups.google.com/group/jets3t-users/browse_thread/thread/d39f32168fd0c217?hl=en