Hi @bija664. This might be caused by something having gone wrong during the installation of the "Arduino AVR Boards" platform of the Arduino Uno board. If so, it can be fixed by uninstalling and then reinstalling the platform.
I'll provide instructions you can follow to do that:
- Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
- Scroll down through the list of boards platforms until you see the "Arduino AVR Boards" entry.
- Hover the mouse pointer over the "Arduino AVR Boards" entry.
You will see a ●●● icon appear at the top right corner of the entry. - Click the ●●● icon.
A menu will open. - Select "Remove" from the menu.
An "Uninstall" dialog will open. - Click the "YES" button in the "Uninstall" dialog.
The dialog will close. - Wait for the uninstall process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:
Successfully uninstalled platform ...
- Click the "INSTALL" button at the bottom of the "Arduino AVR Boards" entry.
- Wait for the installation process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:
Successfully installed platform ...
Now try compiling the sketch again. Hopefully it will be successful this time.