刚刚学习android,学习listView时总是出现错误“Your content must have a ListView whose id attribute is 'android.R.id.list' ” 说明是xml的ID问题,刚开始写成android="@+id/myList",又改成android:id="@android:id/list"仍然报该错误。 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent ...
你可以使用自定义的ID,android:id="@+id/myList",这种你只需要使用Activity,在程序中直接用findViewById来寻找到listview