at android.widget.AbsListView.obtainView(AbsListView.java:2427)错误

<span style="font-size:18px;">11-29 11:05:05.748: E/ACRA(25117): com.readcity.app fatal error : null
11-29 11:05:05.748: E/ACRA(25117): java.lang.NullPointerException
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.AbsListView.obtainView(AbsListView.java:2427)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.ListView.makeAndAddView(ListView.java:1769)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.ListView.fillDown(ListView.java:672)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.ListView.fillFromTop(ListView.java:733)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.ListView.layoutChildren(ListView.java:1608)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.AbsListView.onLayout(AbsListView.java:2260)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.View.layout(View.java:13846)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.ViewGroup.layout(ViewGroup.java:4498)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.View.layout(View.java:13846)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.ViewGroup.layout(ViewGroup.java:4498)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.View.layout(View.java:13846)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.ViewGroup.layout(ViewGroup.java:4498)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.View.layout(View.java:13846)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.ViewGroup.layout(ViewGroup.java:4498)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.View.layout(View.java:13846)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.ViewGroup.layout(ViewGroup.java:4498)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.View.layout(View.java:13846)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.ViewGroup.layout(ViewGroup.java:4498)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.View.layout(View.java:13846)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.ViewGroup.layout(ViewGroup.java:4498)
11-29 11:05:05.748: E/ACRA(25117): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.View.layout(View.java:13846)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.ViewGroup.layout(ViewGroup.java:4498)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1940)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1761)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1070)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4296)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.Choreographer.doCallbacks(Choreographer.java:555)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.Choreographer.doFrame(Choreographer.java:525)
11-29 11:05:05.748: E/ACRA(25117): 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
11-29 11:05:05.748: E/ACRA(25117): 	at android.os.Handler.handleCallback(Handler.java:615)
11-29 11:05:05.748: E/ACRA(25117): 	at android.os.Handler.dispatchMessage(Handler.java:92)
11-29 11:05:05.748: E/ACRA(25117): 	at android.os.Looper.loop(Looper.java:137)
11-29 11:05:05.748: E/ACRA(25117): 	at android.app.ActivityThread.main(ActivityThread.java:4875)
11-29 11:05:05.748: E/ACRA(25117): 	at java.lang.reflect.Method.invokeNative(Native Method)
11-29 11:05:05.748: E/ACRA(25117): 	at java.lang.reflect.Method.invoke(Method.java:511)
11-29 11:05:05.748: E/ACRA(25117): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:804)
11-29 11:05:05.748: E/ACRA(25117): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:571)
11-29 11:05:05.748: E/ACRA(25117): 	at dalvik.system.NativeStart.main(Native Method)</span>


这个错误是由于使用ListView的Adapter时,在Adapter的getView()方法中返回了null,造成的。

你可能感兴趣的:(at android.widget.AbsListView.obtainView(AbsListView.java:2427)错误)