通过 Wi-Fi 运行/安装/调试 Android 应用程序?

1299
我认为有一种方法可以通过Wi-Fi在开发中测试您的应用程序。这可能吗?
我希望能够无线开发,解放手机束缚。

61
更不用说,如果您需要调试与USB附加设备通信的应用程序。 - Dax Fohl
7
你现在可以使用这个,安装这个插件后,即可享受通过 WiFi 进行调试的便利。 - Devendra Singh
5
可能是 如何通过 TCP 连接 ADB 到 Android 设备? 的重复问题。 - hcarrasko
从Android 11及以上版本开始,您可以扫描QR码并连接物理设备,无需任何USB电缆。 - user2786685
如果您不介意,能否请您采纳我的答案呢?因为当前被采纳的回答已经过时,现在有更好的方法来通过Wifi调试应用程序。 - user158
显示剩余2条评论
42个回答

-1

我使用adb shell ip -f inet addr show wlan0命令在adb tcpip 5555之后查找设备IP。

新版本已弃用adb netcfg。因此,当接口名称为wlan0(默认接口名称)时,这是查找设备IP的正确方法。


-3

这太简单了...

步骤1:

connect mobile to laptop (PC)
find adb path in Eclipse or Go Tast manager (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Esc</kbd>) -> process -> adb.exe -> right-click -> open file location -> copy the path of the open window (like D:\.....)

步骤2:

open cmd and change directory like C:, D:, E:, and G:
 1: C:\Users\UMT>D:
 2: D:\> cd (past path of adb) like (ANDROID eclipse\Eclipse Setup\adt-bundle-windows-x86_64-202\sdk\plat-form-tools) and press enter
 3: Then type `adb tcpip 5555`. Press <kbd>Enter</kbd> ... make sure your mobile connects to the PC

步骤三:

Open new cmd and same above, go to the adb directory and type
adb connect 192.168.x.x(device ip):5555
press enter now connect it.

设备IP地址:设置 -> 关于手机 -> 状态 -> IP地址


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接