android 报错信息,
java.lang.NullPointerException: Attempt to invoke virtual method
'void android.widget.TextView.setText(java.lang.CharSequence)'
on a null object reference at com.example.dong.myapplication.home.adapter.testAdapter.getView
(TestAdapter.java:502)
排查得知:
在获取控件时id不正确,导致获取不到textview,在设置textview文字时,即会报 NullPointerException,
解决方法:
findViewById() 找到正确的控件id即可