clear ExpandableListView

Try by type casting null with BaseExpandableListAdapter like below.

listview.setAdapter((BaseExpandableListAdapter)null);

Have you tried inputting an empty adapter? Something like the following:

ExpandableListAdapter adapter = new ExpandableListAdapter(); //or what ever adapter you use/created
listView.setAdapter(adapter);

This is not a null adapter and you will not get a null pointer. The adapter will contain no elements to display/show/populate.

You can check if the adapter is empty by calling isEmpty().