How to connect android emulator to the internet

前端 未结 30 1904
独厮守ぢ
独厮守ぢ 2020-11-22 04:38

How can I connect my Android emulator to the internet, e.g. to use the browser? I\'ve found lots of advice on what do to when your connected through a proxy, but that\'s not

30条回答
  •  無奈伤痛
    2020-11-22 05:07

    I encounter this issue when I first run the simulator, I solved it by setting the dns server with

    Library/Android/sdk/platform-tools/adb shell getprop net.dns1
    

    get the current dns server of simulator 10.0.2.3

    Then set it to my lan dns server

    Library/Android/sdk/platform-tools/adb shell setprop net.dns1 192.168.1.1
    

提交回复
热议问题