在使用ArrayAdapter时使用自己写的R.layout.list_item布局容易出现:ArrayAdapter requires the resource ID to be a TextView 报错,而使用android.R.layout.simple_expandable_list_item_1布局则不会....
问题出在:Textview 必须是该布局的根结点 ,将下面一句加入到<TextView>标签里就好了
xmlns:android=http://schemas.android.com/apk/res/android 就是这句了....