My editor always says I have selected the wrong board

What board do you select in the IDE Tools, Boards menu?

Did you install the ESP32 plug in to the IDE?