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

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

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



        
18条回答
  •  执笔经年
    2020-11-28 11:25

    To add another trivial mistake to the answers to look out for:

    Check that you're actually editing the right layout XML file...

提交回复
热议问题