安卓开发 listView 里面有一个button控件,给该button绑定点击事件报错
Uncaughthandler:threadmainexitingduetouncaughtexceptionjava.lang.NullPointerException...
Uncaught handler: thread main exiting due to uncaught exception
java.lang.NullPointerException
at com.situo.utils.MyAdapter.getView(MyAdapter.java:90)
at android.widget.AbsListView.obtainView(AbsListView.java:1273)
at android.widget.ListView.measureHeightOfChildren(ListView.java:1147)
at android.widget.ListView.onMeasure(ListView.java:1060)
at android.view.View.measure(View.java:7703)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2989)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:888)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:350)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:278)
at android.view.View.measure(View.java:7703)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:569)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:361)
at android.view.View.measure(View.java:7703)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2989)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
at android.view.View.measure(View.java:7703)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:464)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:278)
at android.view.View.measure(View.java:7703)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2989)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
at android.view.View.measure(View.java:7703)
at android.view.ViewRoot.performTraversals(ViewRoot.java:747) 展开
java.lang.NullPointerException
at com.situo.utils.MyAdapter.getView(MyAdapter.java:90)
at android.widget.AbsListView.obtainView(AbsListView.java:1273)
at android.widget.ListView.measureHeightOfChildren(ListView.java:1147)
at android.widget.ListView.onMeasure(ListView.java:1060)
at android.view.View.measure(View.java:7703)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2989)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:888)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:350)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:278)
at android.view.View.measure(View.java:7703)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:569)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:361)
at android.view.View.measure(View.java:7703)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2989)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
at android.view.View.measure(View.java:7703)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:464)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:278)
at android.view.View.measure(View.java:7703)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2989)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
at android.view.View.measure(View.java:7703)
at android.view.ViewRoot.performTraversals(ViewRoot.java:747) 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询