How to connect Android Studio running inside WSL2 with connected devices or android emulator running on host

会有一股神秘感。 提交于 2021-01-28 03:55:32

问题


I'm running Android Studio (currently in version 3.6.1) under Ubuntu 18.04 in WSL 2 (Windows 10 2004), which now supports GUI. Since virtualization inside WSL2 doesn't work, I need to keep running my emulator on the host and of course, connected devices which I use for debugging my android app appear on the host.

How can Android Studio see the emulator and devices appearing on the host?


回答1:


There is a way for the connected devices, but this has to be done one by one:

  1. on windows:adb tcpip 5555
  2. on wsl2: adb connect [ip device]:5555

and in android studio should you see the device



来源:https://stackoverflow.com/questions/62145379/how-to-connect-android-studio-running-inside-wsl2-with-connected-devices-or-andr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!