ESP32 shows offline in the android app while using local server

ESP32 shows always offline in android app while connected to local server.
But i did the same code (i changed libraries for nodemcu) for my node mcu it connected to android app and local server and it has shown online.
I don’t know whats wrong with esp32. please help me if anybody knows

Your chances of getting some help would increase significantly of you share your code formated properly