findViewById() returns null for custom component in layout XML, not for other components

前端 未结 18 1540
情歌与酒
情歌与酒 2020-11-28 10:36

I have a res/layout/main.xml including these elements and others:



        
18条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 11:30

    Seems there is a variety of reasons. I just used "Clean..." in Eclipse to solve a similar problem. (FindViewByID had worked before and for some reason started to return null.)

提交回复
热议问题