java.lang.NullPointerException at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:394)ArrayAdapter<Comment> adapter = new ArrayAdapter<Comment>(this, android.R.layout.simple_list_item_1, values);
values其中至少有一个空对象,您不能拥有。
您可以通读源代码,并在此处看到这种情况:
T item = getItem(position);if (item instanceof CharSequence) { text.setText((CharSequence)item);} else { text.setText(item.toString()); // Line 394, when item is null this throws an NPE}


