android java onClick Could not execute method of the activity

前端 未结 4 1299
没有蜡笔的小新
没有蜡笔的小新 2020-12-16 00:09

This is my first time working with the recyclerview and I am getting some errors about android:onClick=\"addItem\" here is what I get when I try to add a line o

4条回答
  •  春和景丽
    2020-12-16 00:42

    Change public void addItemInRec to public void addItem. There is no method for onClick in mainActivity.

提交回复
热议问题