且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

您的内容必须有一个ListView,其id属性是'android.R.id.list“

更新时间:2023-12-03 21:22:34

重命名你的ListView像这样的ID,

Rename the id of your ListView like this,

<ListView android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"/>

由于您使用的 ListActivity XML文件必须指定关键字的机器人的同时提一个ID。

Since you are using ListActivity your xml file must specify the keyword android while mentioning to a ID.

如果您需要自定义的ListView ListActivity ,你要简单地扩展了活动,应该有相同的ID不包含此关键字的机器人的。

If you need a custom ListView then instead of Extending a ListActivity, you have to simply extend an Activity and should have the same id without the keyword android.