android - Android 上的 Jets3t

标签 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.

我可以做些什么来让它工作吗?

最佳答案

显然,您可以通过设置以下系统属性来解决 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

关于android - Android 上的 Jets3t,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2719257/

相关文章:

java - 使用Java将包含文件的目录上传到S3

file-upload - 从 Apache Spark 分段上传到 Amazon S3

java - 有没有办法列出请求者付款标记的 Amazon S3 存储桶中的对象?

android - READ_PHONE_NUMBERS 在 android O 下不工作

android - 在 onCreate 方法之前从 Activity 获取 Intent Extras

hadoop - 使用 Spark/Hadoop 从 S3 读取时出错

java - 通过 Jets3t 读取 aws-s3 的 LastModifiedDate 在 Java-8 中失败,但在 Java-7 中成功

java - ActionBar 之前的第一项 ListView

android - 为什么 RecyclerView 中的交错网格布局元素在加载图像时会自动交换其位置?

android - AOSP只下载一种口味(ICS)源码