java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'

后端 未结 4 1887
不思量自难忘°
不思量自难忘° 2020-12-10 15:31

I know that there has been simialr questions but I can\'t make it work even though I look at those. The error message is:

java.lang.RuntimeException:

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-10 16:05

    The problem is here :

    android:id="@+id/list"
    

    you are adding a new id for your ListView but ListFragment needs a default Android ListView Id

    change your ListView Id to :

    
    

提交回复
热议问题