Today in the development of Android small applications, the use of the ListView, in the use of their own style of the ListView, there is the error message such as the title, this let me wonder, not before this problem ah, but also can run, quickly check the information to find the reason, The original is my main activity inherited listactivity, and Listactivity must have a ListView, because Listactivity startup will default to look for this ListView ID, if not found, will error.
The workaround is simply to add a ListView to the main activity layout file with the ID list
The code is as follows:
< ListView Android:id = "@id/android:list" android:layout_width= "Fill_parent" android:layout_height= "Wrap_ Content "></ListView>
When using the ListView, you encounter the Your content must has a ListView whose id attribute is ' Android. R.id.list ' ERROR