Null pointer exception outside my code

I get Null Pointer Exception at open ListActivity in my code but all trace is not my code.

java.lang.NullPointerException at android.widget.AbsListView.obtainView(AbsListView.java:2606) at android.widget.ListView.makeAndAddView(ListView.java:1840) at android.widget.ListView.fillDown(ListView.java:681) at android.widget.ListView.fillFromTop(ListView.java:742) at android.widget.ListView.layoutChildren(ListView.java:1661) at android.widget.AbsListView.onLayout(AbsListView.java:2427) at android.view.View.layout(View.java:14938) at android.view.ViewGroup.layout(ViewGroup.java:4601) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1021) at android.view.View.layout(View.java:14938) at android.view.ViewGroup.layout(ViewGroup.java:4601) at android.widget.FrameLayout.onLayout(FrameLayout.java:448) at android.view.View.layout(View.java:14938) at android.view.ViewGroup.layout(ViewGroup.java:4601) at android.widget.FrameLayout.onLayout(FrameLayout.java:448) at android.view.View.layout(View.java:14938) at android.view.ViewGroup.layout(ViewGroup.java:4601) at android.widget.Li nearLayout.setChildFrame(LinearLayout.java:1694) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1552) at android.widget.LinearLayout.onLayout(LinearLayout.java:1465) at android.view.View.layout(View.java:14938) at android.view.ViewGroup.layout(ViewGroup.java:4601) at android.widget.FrameLayout.onLayout(FrameLayout.java:448) at android.view.View.layout(View.java:14938) at android.view.ViewGroup.layout(ViewGroup.java:4601) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2212) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2026) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1236) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5160) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:791) at android.view.Choreographer.doCallbacks(Choreographer.java:591) at android.view.Choreographer.doFrame(Choreographer.java:561) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java: 777) at android.os.Handler.handleCallback(Handler.java:725) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5365) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) at dalvik.system.NativeStart.main(Native Method)

How I can know where the error occurs?


As @iagreen said, "Specifically, you are returning null from your getView method of your Adapter".

I was returning null in some case in custom adapter in getWiew.

链接地址: http://www.djcxy.com/p/93132.html

上一篇: 尝试将ImageView放入适配器时为空

下一篇: 我的代码以外的空指针异常