Multiple libraries were found for "WiFi.h"

In our project we are trying to compile the code but get an error cases like

Multiple libraries were found for "WiFi.h"
Used: C:\Program
Multiple libraries were found for "SPI.h"
Used: C:\Users\OWNER\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SPI

Can anyone suggest how to solve this issue ?

don't include WiFi.h, WiFiClient.h or WiFiServer.h in the sketch
only include ESP8266WiFi.h

1 Like