It was working fine and suddenly it started showing me "connected no internet" I haven't made any changes to my router. Same laptop.
This is what I tried so far:
-Wide data
-Cold boot
-Restart Android studio
-Check for updates
-Restart/Shutdown laptop
-Delete emulator and adding a new one
-Adding new emulator with a higher API
-Changing laptop wifi DNS to 8.8.8.8
-adb kill-server
and adb start-server
-Deleting .android
folder from C:\Users\USERNAME\
-Emulator extended controls -> settings -> proxy -> Manual proxy configurations + hostname
The only working solution was this command:
c:\users\USERNAME\AppData\Local\android\sdk\emulator\emulator -avd AVD_NAME -dns-server 8.8.8.8
But I have to open the emulator always using this command and the CMD window must stay open. If I close it or killed the command with ctrl+c
, internet connection is lost again.
Any ideas on how to resolve this?
I'm using Pixel 2 API 29 Android Studio 4.0.1
Thanks
EDIT: I have looked at several SO with similar problem, nothing solved it so far. I am still using the above command to open the emulator and force it to use 8.8.8.8 so it can have a connection