When you connect to a WiFi network via your Android device, the network automatically assign you an IP address and Gateway. To manually add IP address on Android, do as follows:
1. Open Settings and go to WiFi settings
2. Tao on the WiFi network to manually add IP address
3. Check Show advanced Options.
4. IP Address is set to DHCP by default, tap and change it to Static.
5. Now manually add IP Address, Gateway, and DNS
Note that if you want to manually add an IP address for an already connected WiFi network, first you need to long press on the network's name and select the Forget Network option