I am altering data for the RecyclerView in the background Thread. I got the same Exception as the OP. I added this after changing data:
myRecyclerView.post(new Runnable() {
@Override
public void run() {
myRecyclerAdapter.notifyDataSetChanged();
}
});
Hope it helps