Caused by: java.lang.NullPointerException
at android.widget.ListView.clearRecycledState(ListView.java:522)
at android.widget.ListView.resetList(ListView.java:508)
at android.widget.ListView.setAdapter(ListView.java:440)
at com.company.myapp.MyActivity.refreshList(MyActivity.java:85)
at com.company.myapp.MyActivity.onCreate(MyActivity.java:37)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
... 11 mored
In this case, the exception in eclipse is in your listView. setAdapter (adapter... The listView and adapter do not have null values.
You should consider whether the FooterView or HeaderView you added is null because it is null... The height cannot be measured in ListView... Then the layout is unavailable .. Finally, an error is reported... The addFooterView and addHeaderView methods must be placed in
ListView. setAdapter (adapter); front, otherwise, the FooterView or HeaderView you want will not appear;