I had this problem when I was using serial on pins 0 and 1, instead of software serial, and leaving the serial connection plugged in while I was trying to upload. You can also try reinstalling the IDE.
I had this problem when I was using serial on pins 0 and 1, instead of software serial, and leaving the serial connection plugged in while I was trying to upload. You can also try reinstalling the IDE.