Android Studio - Android Emulator Wifi Connected with No Internet

前端 未结 21 1931
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 13:42

I have wasted a whole day trying out different solutions floating around in SO and other place mentioned to enable wifi on the android emulator but to no avail. Can anybody

21条回答
  •  猫巷女王i
    2020-11-27 14:19

    For me this helped: On Mac OSX (Catalina for me), the problem is caused by the fact that the emulator automatically picks up the nameserver by looking at /etc/resolv.conf and picking the first one, in my case, an IPv6 address. Source

    Simply edit the file ($ sudo vi /etc/resolv.conf) and move the IPv4 address (192.168.1.1 in my case) to be first, before the IPv6 addresses.

    Seriously, that was it. From Demetrios Christopher

提交回复
热议问题