How to connect the emulator that comes with AndroidStudio to the Internet

step:

1. First open the mobile phone emulator that comes with AndroidStudio, and add platform-tools under the SDK folder to the system variable Path .

 2. Enter in cmd: adb shell and press Enter. If it is as shown in the figure below, it means that the addition is successful. Just enter exit to exit.

3. After entering cmd, you need to enter adb root to root the emulator to modify DNS. Here I have rooted successfully.

4. Next, enter getprop to get the simulator system properties. Find the item [net.eth0.dns1] and find that it is 10.0.2.3, then we enter setprop net.eth0.dns1 192.168.1.1

After re-editing:

5. Then the simulator can be connected to the Internet! ! !

 If you have any questions, welcome to comment or communicate privately! ! !

Guess you like

Origin blog.csdn.net/WwLK123/article/details/123741371