I’m using AsyncTask to download and parse XML content from i-net. Downloading and parsing of the xml happens in doInBackground() method. The “dalvikvm” encounters a problem – it could not find a method.
Here is the log of 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}
Could some one to help me and explain why it couldn’t find the specified method?
Thanks!
Looking on Google, I found this and this.
Looks like StAX is not available on Android, but that an “equivalent” XmlPullParser is available.