如何通过WiFi使用ADB在Android Studio中进行调试 [英] How to debug in Android Studio using adb over WiFi

查看:468
本文介绍了如何通过WiFi使用ADB在Android Studio中进行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用adb connect连接到手机,也可以使用adb shell。

I'm able to connect to my phone using adb connect, and I can adb shell also.

但是当我转到运行->设备选择器时,没有设备。

But when I go to Run->Device Chooser, there are no devices there.

我该怎么做才能连接(已连接的)adb Android Studio?

What should I do to connect my (connected) adb Android Studio?

何时我通过USB插入它,它显示在列表中

When I plug it in through USB, it shows up on the list

推荐答案

您可以在/ platform-tools /中找到adb工具

You can find the adb tool in /platform-tools/

cd Library/Android/sdk/platform-tools/

您可以使用以下方式检查设备:

You can check your devices using:

./adb devices

我的结果:

List of devices attached
XXXXXXXXX   device

设置TCP端口:

./adb shell setprop service.adb.tcp.port 4444

./adb tcpip 4444

结果消息:

restarting in TCP mode port: 4444

要建立wifi连接,您必须检查设备IP并执行:

To init a wifi connection you have to check your device IP and execute:

./adb connect 192.168.0.155:4444

祝你好运!

这篇关于如何通过WiFi使用ADB在Android Studio中进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆