He acted interested then he rejected me?

So an attractive girl (men often tell me that I am attractive) gives you attention. She bring cakes, sweets, fruits and gifts for you.
this guy I like stared at me, was always being around me, was shy when he talked to me.. but later said that I was not his type. Why would he act interested but later reject me?
he hurt me.
He acted interested then he rejected me?
Post Opinion