The problem is when you are connected through the router, the androidwifi in your emulator uses the settings and the sets the DNS to something other than 8.8.8.8 which is the google DNS(I presume this is kinda mandatory setting for the androidwifi to gain internet access). I hope it works for : I figured the problem with this and fixed it. This fixed it for me after I unsuccessfully tried all the other solutions found on this page and many others.
#ANDROID DNS PROBE FINISHED NO INTERNET ANDROID#
Click on Proxy at the top and make sure Use Android Studio Http proxy settings IS CHECKED.