How to solve error: Could not find method onClick(View) in a parent or ancestor Context for android:onClick

后端 未结 5 1243
太阳男子
太阳男子 2020-12-20 19:27

I have seen that there\'s been some similar questions but the answers to those haven\'t helped me so far. The full error:

java.lang.IllegalStateExcept

5条回答
  •  执笔经年
    2020-12-20 19:43

    I had the same issue, in my case I have 2 activities using the same layout so when I changed the OnClick event name it will crash in other activity try to check the setContentView layout in the crashing activity

提交回复
热议问题