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

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


当前回答

(不需要根)有一个最好的,简单的和Android Studio的UI方法

IntelliJ和Android Studio插件创建快速连接您的Android设备通过WiFi安装,运行和调试您的应用程序没有USB连接。按下一个按钮,就不用管USB线了。

只需安装插件Android WiFi ADB

直接下载安装Android WiFi ADB

Intellij / Android Studio:首选项/设置->插件->浏览库

.

记住!第一次初始化设备,您必须使用usb连接

或者,您也可以从JetBrains插件站点下载插件并手动安装:Preferences/Settings->Plugins->从磁盘安装插件。

您可以轻松连接和管理您的设备.......更多信息请阅读这里https://github.com/pedrovgs/AndroidWiFiADB

其他回答

最好的方法是使用ADBConnect (Eclipse插件)和ADB Wireless (Android设备应用程序)。

对于Ubuntu / Linux:

Make sure your device is working for debugging: http://developer.android.com/tools/help/adb.html#Enabling Go to your sdk folder and find the folder platform-tools Use ./adb devices to list the connected devices. Make sure it is only one device connected and no emulator running. Find your device IP address, you can find it in your device: http://developer.android.com/tools/help/adb.html#wireless, or got adb shell like this: ./adb shell then netcfg. You will see a list of IP addresses. Find wlan0, in my case 192.168.100.3/2. ./adb tcpip 5555 Finally enter ./adb connect <Your device IP Address>:5555 in your terminal. You can now deploy the application to your device over Wi-Fi.

最好和超级简单的方法是:-

制作批处理文件:-

亚洲开发银行设备 Adb tcpip 5555 adb connect 192.168.9.120:5555(您的电话ip xxx.xxx.x. com)。xxx: 5555)

将此文件放入android sdk platform-tool文件夹。 例子:C:\Users\当地的user_name \ AppData \ \ Android \ Sdk \平台工具 右键单击文件>发送到>桌面(创建快捷方式) 就是这样……

现在你只需要通过USB连接你的手机,然后打开桌面快捷方式,断开你的手机…

android无线调试(MAC)

步骤1:进入sdk文件夹(常用路径“/Users/macname/Library/Android/sdk/platform-tools”) 打开CMD,运行"adb devices" output -附加设备列表

如果在CMD类型中没有找到adb命令 。/亚洲开发银行——的帮助 OS X / macOS:典型的~/。Profile或~/.bash_profile 在这里添加以下一行,并将其替换为安装platform-tools的路径:

步骤2: $PATH ="/Users/macname/Library/Android/sdk/platform-tools"

步骤3: $ adb设备 所附设备清单 ZH99FF7FTY设备

步骤4: $ adb tcpip 5555 以TCP模式重新启动端口:5555

步骤5: $ adb connect 10.124.32.18:5555 已连接到10.124.32.18:5555

下次重复步骤4和5重新连接 或者如果设备重新启动但没有连接,请再次执行步骤 祝你好运

虽然有这么多好的答案,这里是我对未来的我的两点意见:P和任何想要快速简单的人。

Mac:

首先使用USB连接设备,并确保调试工作正常。断开任何其他设备并退出模拟器。 打开终端,运行以下脚本 Adb tcpip 5555 Adb connect $(Adb shell ifconfig | grep "inet " | grep -v 127.0.0.1 | awk '{print $2}' | cut -d: -f2):5555 断开USB连接,设备应可进行WiFi调试

解释:

Adb tcpip 5555命令设备开始监听端口5555上的连接

Adb connect $(_ip_address_fetched_):5555表示连接到_ip_address_fetched_地址的5555端口

其中_ip_address_fetched_包含以下内容:

Adb shell ifconfig使用Adb shell获取Internet配置

Grep "inter "过滤任何以inter开头的行

排除本地主机。

此时,输出应该是这样的:

inet addr :###.###.#.# # #广播地址 :###.###.#.# # #面具:255.255.255.0

awk '{print $2}'获取组件数组的第二部分,用空格分隔(我使用zsh)。

到此为止的输出是

addr :###.###.#.###

Cut -d: -f2用分隔符分割字符串,然后取第二部分。它只会接收你的设备IP地址