Q:

Not annotated method overrides method annotated with @NonNull

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);
    }

A:

The @NonNull should be over the method signature, and it should be in the override method as well
@Override
@NonNull
public NumberViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) { }

