android connect to PC's localhost when debugger on mobile device

前端 未结 5 932
梦谈多话
梦谈多话 2020-12-05 10:36

I want to debug my android application, I connect the android device to my PC using the USB cable. In my application there is a button to connect with localhost, ip for loca

5条回答
  •  囚心锁ツ
    2020-12-05 10:57

    I think you have two options

    The first one is using 10.0.2.3 when you use your real android device.it works for me.

    Your Second opt is creating hotspot from your pc and connect your android device to the hotspot.

    Find the ip address using cmd type "ipconfig" replace localhost with the ip address.

    Thanks.

提交回复
热议问题