我已经下载了http://techiedreams.com/android-rss-reader-part-3-action-bar-with-animated-item/来创建一个自定义RSS阅读器一段时间,但最近它开始表现,起初我认为这是我自己的错,但后来我重新下载了前三个版本(其中顺便使用它们的5个星期完美地工作了很棒,我只是定制它以获得一些Java和Java的经验。 Android编程
然而,我一直陷入困境,我不知道如何解决这个问题。
这是我的活动LogCat的日志(这只是我从下载RSS链接器时得到的错误),它应该加载RSS提要并初始化ListActivity。
06-19 12:20:06.750: D/dalvikvm(30977): GC_FOR_ALLOC freed 67K, 7% free 12338K/13127K, paused 25ms, total 26ms
06-19 12:20:06.750: I/dalvikvm-heap(30977): Grow heap (frag case) to 12.935MB for 337616-byte allocation
06-19 12:20:06.760: D/dalvikvm(30977): GC_FOR_ALLOC freed <1K, 7% free 12666K/13511K, paused 9ms, total 9ms
06-19 12:20:06.905: I/dalvikvm(30977): Could not find method org.jsoup.Jsoup.parse, referenced from method com.td.rssreader.parser.DOMParser.parseXml
06-19 12:20:06.915: D/libEGL(30977): loaded /system/lib/egl/libEGL_mali.so
06-19 12:20:06.925: D/libEGL(30977): loaded /system/lib/egl/libGLESv1_CM_mali.so
06-19 12:20:06.925: D/libEGL(30977): loaded /system/lib/egl/libGLESv2_mali.so
06-19 12:20:06.930: D/(30977): Device driver API match
06-19 12:20:06.930: D/(30977): Device driver API version: 10
06-19 12:20:06.930: D/(30977): User space API version: 10
06-19 12:20:06.935: D/(30977): mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Tue Oct 16 15:37:13 KST 2012
06-19 12:20:06.975: D/OpenGLRenderer(30977): Enabling debug mode 0
06-19 12:20:07.005: W/dalvikvm(30977): VFY: unable to resolve static method 267: Lorg/jsoup/Jsoup;.parse (Ljava/lang/String;)Lorg/jsoup/nodes/Document;
06-19 12:20:07.005: D/dalvikvm(30977): VFY: replacing opcode 0x71 at 0x00b6
06-19 12:20:10.485: D/dalvikvm(31065): GC_FOR_ALLOC freed 70K, 7% free 12338K/13127K, paused 16ms, total 16ms
06-19 12:20:10.490: I/dalvikvm-heap(31065): Grow heap (frag case) to 12.935MB for 337616-byte allocation
06-19 12:20:10.520: D/dalvikvm(31065): GC_FOR_ALLOC freed <1K, 7% free 12666K/13511K, paused 12ms, total 12ms
06-19 12:20:10.555: I/dalvikvm(31065): Could not find method org.jsoup.Jsoup.parse, referenced from method com.td.rssreader.parser.DOMParser.parseXml
06-19 12:20:10.555: W/dalvikvm(31065): VFY: unable to resolve static method 267: Lorg/jsoup/Jsoup;.parse (Ljava/lang/String;)Lorg/jsoup/nodes/Document;
06-19 12:20:10.555: D/dalvikvm(31065): VFY: replacing opcode 0x71 at 0x00b6
06-19 12:20:10.610: D/libEGL(31065): loaded /system/lib/egl/libEGL_mali.so
06-19 12:20:10.620: D/libEGL(31065): loaded /system/lib/egl/libGLESv1_CM_mali.so
06-19 12:20:10.625: D/libEGL(31065): loaded /system/lib/egl/libGLESv2_mali.so
06-19 12:20:10.625: D/(31065): Device driver API match
06-19 12:20:10.625: D/(31065): Device driver API version: 10
06-19 12:20:10.625: D/(31065): User space API version: 10
06-19 12:20:10.625: D/(31065): mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Tue Oct 16 15:37:13 KST 2012
06-19 12:20:10.670: D/OpenGLRenderer(31065): Enabling debug mode 0
06-19 12:20:11.255: D/dalvikvm(31065): GC_CONCURRENT freed 387K, 8% free 12736K/13703K, paused 4ms+11ms, total 32ms
06-19 12:20:11.360: D/dalvikvm(31065): GC_CONCURRENT freed 261K, 7% free 12876K/13767K, paused 11ms+11ms, total 34ms
06-19 12:20:11.425: D/dalvikvm(31065): GC_CONCURRENT freed 371K, 7% free 13071K/14023K, paused 11ms+1ms, total 23ms
06-19 12:20:11.425: D/dalvikvm(31065): WAIT_FOR_CONCURRENT_GC blocked 4ms
06-19 12:20:11.500: D/dalvikvm(31065): GC_CONCURRENT freed 376K, 7% free 13245K/14215K, paused 11ms+11ms, total 36ms
06-19 12:20:11.560: D/dalvikvm(31065): GC_CONCURRENT freed 361K, 7% free 13382K/14343K, paused 12ms+2ms, total 26ms
06-19 12:20:11.615: D/dalvikvm(31065): GC_CONCURRENT freed 361K, 7% free 13590K/14535K, paused 2ms+2ms, total 17ms
06-19 12:20:11.615: D/dalvikvm(31065): WAIT_FOR_CONCURRENT_GC blocked 5ms
06-19 12:20:11.645: D/dalvikvm(31065): GC_FOR_ALLOC freed 274K, 7% free 13646K/14663K, paused 11ms, total 11ms
06-19 12:20:11.660: D/dalvikvm(31065): GC_FOR_ALLOC freed 116K, 8% free 13723K/14791K, paused 11ms, total 11ms
06-19 12:20:11.690: D/dalvikvm(31065): GC_CONCURRENT freed 412K, 7% free 13859K/14855K, paused 1ms+1ms, total 13ms
06-19 12:20:11.690: D/dalvikvm(31065): WAIT_FOR_CONCURRENT_GC blocked 5ms
06-19 12:20:11.740: D/dalvikvm(31065): GC_CONCURRENT freed 452K, 7% free 14011K/15047K, paused 12ms+2ms, total 25ms
06-19 12:20:11.740: D/dalvikvm(31065): WAIT_FOR_CONCURRENT_GC blocked 4ms
06-19 12:20:11.770: W/dalvikvm(31065): threadid=11: thread exiting with uncaught exception (group=0x40fc92a0)
06-19 12:20:11.775: E/AndroidRuntime(31065): FATAL EXCEPTION: AsyncTask #1
06-19 12:20:11.775: E/AndroidRuntime(31065): java.lang.RuntimeException: An error occured while executing doInBackground()
06-19 12:20:11.775: E/AndroidRuntime(31065): at android.os.AsyncTask$3.done(AsyncTask.java:299)
06-19 12:20:11.775: E/AndroidRuntime(31065): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
06-19 12:20:11.775: E/AndroidRuntime(31065): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
06-19 12:20:11.775: E/AndroidRuntime(31065): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
06-19 12:20:11.775: E/AndroidRuntime(31065): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
06-19 12:20:11.775: E/AndroidRuntime(31065): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
06-19 12:20:11.775: E/AndroidRuntime(31065): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
06-19 12:20:11.775: E/AndroidRuntime(31065): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
06-19 12:20:11.775: E/AndroidRuntime(31065): at java.lang.Thread.run(Thread.java:856)
06-19 12:20:11.775: E/AndroidRuntime(31065): Caused by: java.lang.NoClassDefFoundError: org.jsoup.Jsoup
06-19 12:20:11.775: E/AndroidRuntime(31065): at com.td.rssreader.parser.DOMParser.parseXml(DOMParser.java:71)
06-19 12:20:11.775: E/AndroidRuntime(31065): at com.td.rssreader.SplashActivity$AsyncLoadXMLFeed.doInBackground(SplashActivity.java:104)
06-19 12:20:11.775: E/AndroidRuntime(31065): at com.td.rssreader.SplashActivity$AsyncLoadXMLFeed.doInBackground(SplashActivity.java:1)
06-19 12:20:11.775: E/AndroidRuntime(31065): at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-19 12:20:11.775: E/AndroidRuntime(31065): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
06-19 12:20:11.775: E/AndroidRuntime(31065): ... 5 more
如果有必要,我可以在这里发布代码,但也可以在这里下载http://techiedreams.com/android-rss-reader-part-3-action-bar-with-animated-item/。
请注意,这一切都曾经在很长一段时间内发挥作用,直到昨天它才开始表现得像这样。
任何人都可以告诉我发生了什么事。
答案 0 :(得分:2)
如果您仔细浏览日志,您会发现根本原因。
Caused by: java.lang.NoClassDefFoundError: org.jsoup.Jsoup
这会立即告诉您在android中找不到jsoup
库。我在过去遇到类似的问题,其中android无法找到库。我已按照这些步骤纠正了这个问题。
这应该可以解决问题。