File => Preferences... => Additional Boards Manager URLs
https://dl.espressif.com/dl/package_esp32_index.json https://arduino.esp8266.com/stable/package_esp8266com_index.json https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
添加完成後,記得到Tools => Board => Boards Manager...添加如下開發板
esp32 by Espressif Systems esp8266 by ESP8266 Community Arduino ESP32 Boards by Arduino
P.S. 如果沒有添加這些板子,則esp_wifi.h、esp_now.h會找不到