Oh my God! I have been researching this same topic for over a week now. I have changed my router set up, down load so call fixes and was about to get a new device. But, Hallelujah! I found a fix!
{Please do not edit my answer without my permission unless you know me personally. Otherwise, make your own comment what should not or should be stated. I will edit my own answer.}
Did you know that you can long press the connection? It was just that simple.
- Go to Settings and tap on Wi-Fi.
- Turn on the Wi-Fi and connect to a network.
- Long press on the connected network and select Modify Network.
- Check Show Advance Options.
- On IP Settings drop down menu, select Static.
- Assign IP of your choice but leave other variable untouched.
This may not be a total fix for businesses and educational establishments, because an IP address with need to be assigned. But for personal devices, this is a life saver!!!!!!
For further information on this see: https://appslova.com/how-to-fix-obtaining-ip-address-error-in-android/