Your content must have a ListView whose id attribute is 'android.R.id.list'解决办法

这个错误提示很显然是在setContentView(R.layout.main)的地方设置的布局页面缺少一个id为android.R.id.list的ListView控件,解决方式如下:
在main.xml页面中添加如下代码:
<ListView android:id=" @android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</ListView>

你可能感兴趣的:(android,xml,ListView)