如何修复 PlatformIO WiFi.h: No Such File or Directory
***重要提示:***在 ESP8266 上,不推荐此解决方案。请参见如何修复 PlatformIO ESP8266 WiFi.h: No Such File or Directory
问题:
编译 PlatformIO 固件时,你看到类似这样的错误消息
example-3.txt
**************************************************************
* Looking for WiFi.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:WiFi.h"
* Web > https://platformio.org/lib/search?query=header:WiFi.h
*
**************************************************************
2 | #include <WiFi.h>解决方案
将 WiFi 添加到 platformio.ini 中的 lib_deps(如果不存在则创建 lib_deps):
example-2.ini
WiFi然后重新编译。
完整的 platformio.ini 示例:
example-1.ini
platform = espressif8266
board = d1_mini_lite
framework = arduino
monitor_speed = 115200
lib_deps =
ESP Async Webserver@1.2.3
ArduinoJSON@6.17.2
WiFiCheck out similar posts by category:
Arduino, Electronics, PlatformIO
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow