To install the ESP32 board in your Arduino IDE, follow these next instructions:
In your Arduino IDE, go to File> Preferences
Enter https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/packa... into the “Additional Board Manager URLs” field as shown in the figure below. Then, click the “OK” button:
Note: if you already have the ESP8266 boards URL, you can separate the URLs with a comma as follows:
Open the Boards Manager. Go to Tools > Board > Boards Manager…
Search for ESP32 and select fareworks 1.0.4 for stable, press install button for the “ESP32 by Espressif Systems“:
That’s it. It should be installed after a few seconds.