Flow - RedeemApples - Can not resolve method queryBy

Dear Team, I am trying to run Basic Corda App given on website. RedeemApples flow is returning an error for queryBy method.
"Can not resolve method ‘queryBy(Class<AppleStamp’, LinearStateQueryCriteria’)

I have copy pasted same code given in Tutorial.
Please help to resolve the same.