Null pointer Exception - findViewById()

后端 未结 10 2690
情歌与酒
情歌与酒 2020-11-21 04:16

Can anyone help me to find out what can be the issue with this program. In the onCreate() method the findViewById() returns null for all ids and th

10条回答
  •  盖世英雄少女心
    2020-11-21 04:58

    I have gotten this error today and it was so simple to clear, that I "facepalmed".

    Just try to add the UI element to your layout xml File in your res/layout-port directory!!!

提交回复
热议问题