Hi @brankoil. I concur with @ua6em's suggestion. 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.
- Find the "Arduino AVR Boards" entry in the list of boards platforms.
- 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 your sketch again, just as you did before when you encountered that error. Hopefully this time everything will work as expected.