Error when compile ESP32 self-update firmware code

when i write this code in esp8266, it’s work fine. but when i tried that code in esp32 with some changes,
it shows error on compile time:

error:

In file included from C:\Users\Gabbar Singh\Documents\Arduino\ESP32_OTA\ESP32_OTA.ino:5:0:
C:\Users\Gabbar Singh\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\HTTPUpdate\src/HTTPUpdate.h:47:6: error: multiple definition of ‘enum HTTPUpdateResult’
enum HTTPUpdateResult {
^
In file included from C:\Users\Gabbar Singh\Documents\Arduino\ESP32_OTA\ESP32_OTA.ino:3:0:
C:\Users\Gabbar Singh\Documents\Arduino\libraries\ESP32httpUpdate\src/ESP32httpUpdate.h:59:6: note: previous definition here
enum HTTPUpdateResult {
^
Multiple libraries were found for “WiFi.h”
Used:C:\Users\GabbarSingh\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi

exit status 1
Error compiling for board DOIT ESP32 DEVKIT V1.

board which i use : DOIT ESP32 DevKit v1

i think i’ve choose wrong library or something else…

ESP32_OTA.ino (3.4 KB)