Error uploading to Arduino

Every time I try to upload something to my Arduino I get an error message that say -

An error occurred while uploading the sketch

I am new at Arduino so I do not know that much about them. Thanks for any help!

Are you using Arduino IDE 1.6.10? There is a bug in Arduino IDE 1.6.10 that can cause that issue when you start the IDE by opening a sketch(.ino) file(by double clicking on it, etc.). Please try this:

  • Close all Arduino IDE windows
  • Start the Arduino IDE, not by opening a sketch file.
  • Open the sketch file via File > Open, File > Sketchbook, or File > Examples

The last opened sketch will automatically load when you open the Arduino IDE, that one should also work fine.

Please let me know how this works for you so I can provide the developers with more evidence that this is a legitimate bug.