avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe8

I have this problem with my code when i try to upload it:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe8

How do fix it?

I am using an Arduino uno r2 and trying to upload an OLED display demo.

I have fixed it, it was that the atmega328p was the wrong way round

Well, that, uh, that would do it! In the future, you should be sure to mention if an upload is the first one you've tried after swapping the chip around (for example)

spatchler:
I have fixed it, it was that the atmega328p was the wrong way round

Ummm how?