我认为有一种方法可以通过Wi-Fi测试开发中的应用程序。这可能吗?

我希望能够解开我的手机,无线开发。


当前回答

2021年8月编辑

谷歌用ArcticFox Beta 03 https://issuetracker.google.com/issues/190411383删除了它,但在Android Studio Bumblebee它仍然存在。看起来他们有很多问题,这就是为什么它只是金丝雀版本

最初的发布

这个Android WiFi ADB插件不能在4.1.1中工作(不再)

但有一个更简单的解决方案: 如果你有Android 11 (api30)设备,你应该使用Android Studio 2020.3.1 (Canary)来连接。非常简单

然后进入开发者设置,扫描二维码。就是这样。 你现在也可以在其他(旧的)Android Studio版本中使用连接设备

其他回答

1-为此,我认为你已经安装了最新版本的Android studio。如果没有,你可以从这里下载。

2 -可以在“环境变量”中设置平台工具路径(可选)。

3 -确保你的设备和电脑连接到同一个网络。

plug in the data cable from pc to device. Now, type adb tcpip 5555 remove data cable. Then type adb connect 192.168.43.95 here 5555 is the port number and 192.168.43.95 is the ip address of the mobile device you can get id address from the mobile settings . Then go to About device and go to status you can see the ip address of the device. You can connect multiple device from different ports which can give ease in development. Or you can go to this link for brief description with screenshots. http://blogssolutions.co.in/connect-your-android-phone-wirelessly-by-adb

当你按照上面的答案https://stackoverflow.com/a/10236938/6117565,你可能会得到错误“没有路由到主机”。

要解决这个问题,在上述回答的第5步之前,首先启动模拟器,然后尝试连接设备。不知道发生了什么,但这个把戏奏效了。

通过USB连接设备并确保调试工作正常。如果您已经安装了adb并在environment varialbe中设置了它的路径,则执行这些步骤

打开CMD,输入以下命令 Adb tcpip 5555 使用adb shell IP route查找IP地址 adb connect DEVICE_IP_ADDRESS:5555 断开USB并进行无线调试。

2021年8月编辑

谷歌用ArcticFox Beta 03 https://issuetracker.google.com/issues/190411383删除了它,但在Android Studio Bumblebee它仍然存在。看起来他们有很多问题,这就是为什么它只是金丝雀版本

最初的发布

这个Android WiFi ADB插件不能在4.1.1中工作(不再)

但有一个更简单的解决方案: 如果你有Android 11 (api30)设备,你应该使用Android Studio 2020.3.1 (Canary)来连接。非常简单

然后进入开发者设置,扫描二维码。就是这样。 你现在也可以在其他(旧的)Android Studio版本中使用连接设备

在设备设置->“开发人员选项”->“撤销USB调试授权”。 通过USB连接设备并确保调试工作正常。 Adb tcpip 5555 adb connect <DEVICE_IP_ADDRESS>:5555 断开USB 亚洲开发银行设备