Java – runtimeException: the view tag on the view is incorrect: the viewagendaitembinding. Bind() method is null

I have very simple code that should work according to several articles on databinding, but for some reason it is not

I'm trying to use recycleview with databinding

class ItemViewHolder extends RecyclerView.ViewHolder{

    ViewAgendaItemBinding binding;

    public ItemViewHolder(View itemView) {
        super(itemView);
        binding = ViewAgendaItemBinding.bind(itemView); //this is line where it's throw an error.
    }
}
@H_403_8@

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>