gpt4 book ai didi

java - Android StAX Cursor Parser - 找不到方法 javax.xml.stream.XMLInputFactory.newInstance

转载 作者:搜寻专家 更新时间:2023-11-01 07:38:55 27 4
gpt4 key购买 nike

我正在使用 AsyncTask 从 i-net 下载和解析 XML 内容。 xml 的下载和解析发生在 doInBackground() 方法中。 “dalvikvm” 遇到问题 - 它找不到方法。

这是 LogCat 的日志:

06-30 13:26:41.148: DEBUG/dalvikvm(507): GC freed 796 objects / 68088 bytes in 112ms

06-30 13:26:41.667: INFO/ActivityManager(52): Displayed activity com.news.reader/.SplashScreen: 5305 ms (total 63417 ms)

06-30 13:26:45.097: INFO/ActivityManager(52): Starting activity: Intent { cmp=com.news.reader/.DirBgNewsReader }

06-30 13:26:45.418: ERROR/dalvikvm(507): Could not find method javax.xml.stream.XMLInputFactory.newInstance, referenced from method com.news.reader.DirBgNewsReader.parse

06-30 13:26:45.427: WARN/dalvikvm(507): VFY: unable to resolve static method 104: Ljavax/xml/stream/XMLInputFactory;.newInstance ()Ljavax/xml/stream/XMLInputFactory;

06-30 13:26:45.427: WARN/dalvikvm(507): VFY: rejecting opcode 0x71 at 0x0013

06-30 13:26:45.427: WARN/dalvikvm(507): VFY: rejected Lcom/news/reader/DirBgNewsReader;.parse (Ljava/lang/String;)V

06-30 13:26:45.427: WARN/dalvikvm(507): Verifier rejected class Lcom/news/reader/DirBgNewsReader;

06-30 13:26:45.439: WARN/dalvikvm(507): Class init failed in newInstance call (Lcom/news/reader/DirBgNewsReader;)

06-30 13:26:55.217: WARN/ActivityManager(52): Launch timeout has expired, giving up wake lock!

06-30 13:26:55.217: WARN/ActivityManager(52): Activity idle timeout for HistoryRecord{4396eb68 com.news.reader/.DirBgNewsReader}

06-30 13:27:00.300: WARN/ActivityManager(52): Activity destroy timeout for HistoryRecord{43814048 com.news.reader/.SplashScreen}

有人可以帮我解释一下为什么找不到指定的方法吗?

谢谢!

最佳答案

关注Google , 我找到了 thisthis .

StAX 似乎在 Android 上不可用,但“等效”XmlPullParser可用。

关于java - Android StAX Cursor Parser - 找不到方法 javax.xml.stream.XMLInputFactory.newInstance,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6545052/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com