Error uploading sketch to Arduino

So I just got an Arduino Uno and I’m trying to upload sketches to it but I keep getting this error message:
Sketch uses 930 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes. Cannot run program “{}/bin/avrdude”: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(
at cc.arduino.packages.Uploader.executeUploadCommand(
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(
at cc.arduino.UploaderUtils.upload(
Caused by: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(
at java.lang.ProcessImpl.start(
at java.lang.ProcessBuilder.start(
… 8 more
An error occurred while uploading the sketch

I think I have the drivers installed correctly, and I can’t figure out why this is happening. Anyone have any ideas?

Java is no loading variable.

This indicates something has gone wrong with your Arduino AVR Boards installation. To make sure it has been fully uninstalled you need to take some drastic action. Be aware this is somewhat advanced and will remove all boards you have installed via Boards Manager:

  • Click the link on the line following File > Preferences > More preferences can be edited directly in the file. This will open the Arduino15 (or similar name depending on OS) folder.
  • Delete all files and folders under the Arduino15 folder except for preferences.txt. Please be very careful when deleting things from your computer. When in doubt back up!
  • Restart the Arduino IDE

Verify that you can now use your board before reinstalling any packages via Boards Manager.

Hey there,

I make this mistake myself sometimes :smiley: :smiley:

If you click the “Tools” button you will find a section that says: Board:“Whatever board is selected”. By clicking on that you will get a menu with all the Arduino/Genuino boards. Select the one you are using.
This might help but if it doesn’t there is other reasons it won’t upload that I don’t know.

Hope this helps :slight_smile: