I have looked at the previous answers to this problem and have added the @NonNull to the code but I am still getting the error. What could be causing the error?
@Override
public NumberViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) {
Context context = viewGroup.getContext();
int layoutIdForListItem = R.layout.number_list_item;
LayoutInflater inflater = LayoutInflater.from(context);
View view = inflater.inflate(layoutIdForListItem, viewGroup, false);
return new NumberViewHolder(view);
}