Recycler View Remove Item Problem

i use this blocks but i am getting an error , please help me

This is the error :-

Please Help Me Anyone

See, to remove an item you must follow this.

  1. Get data from db
  2. Create dyna compounds based on db
  3. Click on particular item to remove at yhe same time remove that iyem from the variable amd again set this new item in set data or count

It will work

Try this method