notifyDataSetChanged() - IndexOutOfBoundException
问题 I do not understand what is wrong I am use public class UrlArrayAdapter extends BaseAdapter {... ArrayList<UrlItem> objects; UrlArrayAdapter(Context context, ListView urlListView, ArrayList<UrlItem> urlLists) { objects = urlLists; ... //method public void deleteItem(int numberToDelete) { objects.remove(numberToDelete); notifyDataSetChanged(); } AND (the most interesting) I get numberToDelete = 1 This line is then removed but objects and when numberToDelete = 0 This line is then removed but