解决Your content must have a ListView whose id attribute is "android.R.id.list"的问题

Posted 西红柿里没有番茄

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决Your content must have a ListView whose id attribute is "android.R.id.list"的问题相关的知识,希望对你有一定的参考价值。

在使用ListView控件时id命名有个要注意的地方:当你程序报错:Your content must have a ListView whose id attribute is "android.R.id.list"

  当主Activity继承了ListActivity,而ListActivity中必须有一个ListView,因为ListActivity启动时会默认去寻找这个ListView的id,如果没有找到,就会报错。书写源文件的id不能像平常自定义id一样的格式,并且id名是固定的list。如下:

以上是关于解决Your content must have a ListView whose id attribute is "android.R.id.list"的问题的主要内容,如果未能解决你的问题,请参考以下文章

android--------解决Entities and POJOs must have a usable public constructor

A master URL must be set in your configuration问题解决方法

求问fortran大神:This name does not have a type, and must have an explicit type.怎么解决。

如何解决 raise ValueError("columns must have matching element counts") ValueError: columns mus

关于you must reset your password using ALTER USER statement before exectuting this statement 解决

在使用MYSQL进行嵌套查询时出现:Every derived table must have its own alias错误解决方法