读书人

Your content must have a ListView w

发布时间: 2012-09-28 00:03:35 作者: rapoo

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>

结果:
问题解决

http://hi.baidu.com/worldofhua/blog/item/1be25ce9a6eed532b90e2d94.html

?

读书人网 >操作系统

热点推荐