How does one treat a sore knee The more walking the more pain?

You have to rest the knee till it recovers. Is there a way you can avoid walking? Can you use a vehicle or even a bicycle? A bicycle would place stresses on different parts of your leg and might take the pressure off your knee.

Or see a doctor.