简体   繁体   English

通过 Wifi 在 Android Studio BumbleBee 上配对新设备

[英]Pairing new device on Android Studio BumbleBee over Wifi

I have recently updated to Android Bumblebee.我最近更新到 Android Bumblebee。 And I am trying to connect my device wireless through wifi.我正在尝试通过 wifi 无线连接我的设备。 But I get always get the message as seen in screenshot below.但我总是收到如下屏幕截图所示的消息。

I have updated to latest platform tools SDK 32, but still the issue persists.我已经更新到最新的平台工具 SDK 32,但问题仍然存在。 Any help would be appreciated.任何帮助,将不胜感激。

Wifi 配对问题图像

I had a similar problem and managed to solve it the following way:我有一个类似的问题,并设法通过以下方式解决它:

Quick fix快速解决

  1. In Android Studio, File -> Settings在 Android Studio 中,文件 -> 设置
  2. Build, Execution, Deployment -> Debugger构建、执行、部署 -> 调试器
  3. Under Android Debug Bridge (adb), uncheck 'Enable adb mDNS for wireless debugging' and Apply在 Android Debug Bridge (adb) 下,取消选中“为无线调试启用 adb mDNS”并应用
  4. Wait some seconds for changes to take effect等待几秒钟以使更改生效
  5. Recheck 'adb mDNS for wireless debugging' and Apply重新选中“用于无线调试的 adb mDNS”并应用
  6. On the pop-up window from Windows Defender, allow.network access to adb在来自 Windows Defender 的弹出窗口 window 上,允许.network 访问adb

Extended sollution扩展解决方案
By checking the Android Studio logs (Help -> Show Log in Explorer) you can find an error message regarding the adb mDNS daemon .通过检查 Android Studio 日志(Help -> Show Log in Explorer),您可以找到有关adb mDNS 守护程序的错误消息。

INFO - ireless.WiFiPairingServiceImpl - 'adb mdns check' (not supported) result:信息 - ireless.WiFiPairingServiceImpl - 'adb mdns check'(不支持)结果:
INFO - ireless.WiFiPairingServiceImpl - ERROR: mdns daemon unavailable信息 - ireless.WiFiPairingServiceImpl - 错误:mdns 守护进程不可用
INFO - ireless.WiFiPairingServiceImpl - Checking if mDNS is supportState result: NotSupported信息 - ireless.WiFiPairingServiceImpl - 检查 mDNS 是否为 supportState 结果:NotSupported

If you run that command in eg Powershell ( adb mdns check ) you will see that you get the exact same error message.如果您在例如 Powershell ( adb mdns check ) 中运行该命令,您将看到您收到完全相同的错误消息。 After some research I found out you could disable this mDNS service in the Andoid Studio settings.经过一些研究,我发现您可以在 Andoid Studio 设置中禁用此 mDNS 服务。

  1. File -> Settings文件 -> 设置
  2. Build, Execution, Deployment -> Debugger构建、执行、部署 -> 调试器
  3. Under Andoird Debug Bridge (adb), uncheck 'Enable adb mDNS for wireless debugging'在 Andoird Debug Bridge (adb) 下,取消选中“启用 adb mDNS 进行无线调试”
  4. Hit apply点击申请
  5. Recheck 'adb mDNS for wireless debugging'重新检查“用于无线调试的 adb mDNS”
  6. Hit apply点击申请

Now a pop-up window should appear asking you to allow adb.network access.现在应该会出现一个弹出窗口 window,要求您允许 adb.network 访问。 Click on allow access .点击允许访问
Wi-Fi pair should work now. Wi-Fi 对现在应该可以工作了。

I tried all suggested steps, which were well explained but unfortunately didn't solve the problem for me.我尝试了所有建议的步骤,这些步骤得到了很好的解释,但不幸的是并没有为我解决问题。 As I just found out, @Benny has found the same solution to this problem.正如我刚刚发现的那样,@Benny 已经找到了解决这个问题的相同方法。

I found out that by disabling the.network adapter for my NordVPN, the issue suddenly disappeared.我发现通过为我的 NordVPN禁用.network 适配器,问题突然消失了。 If you are using Windows, I'd suggest you check if you have any.network adapter which could be disabled.如果您使用的是 Windows,我建议您检查是否有任何可以禁用的网络适配器。

You can enter this path ( Control Panel\Network and Inte.net\Network Connections ) in your top bar of the Control Panel if you would not like to click through some steps, otherwise just follow these steps:如果您不想点击某些步骤,您可以在控制面板的顶部栏中输入此路径( Control Panel\Network and Inte.net\Network Connections ),否则只需按照以下步骤操作:

  1. Go to "Control Panel" in Windows Go 到 Windows 中的“控制面板”
  2. Click on "Network and Inte.net"单击“网络和 Inte.net”
  3. Click on "Network and Sharing Center"点击“网络和共享中心”
  4. Click on "Change adapter settings"点击“更改适配器设置”
  5. Right-mouse click on any adapter you wish to disable右键单击要禁用的任何适配器

After these changes, check your Android Studio to see if disabling the adapter solved your problem.进行这些更改后,检查您的 Android Studio 以查看禁用适配器是否解决了您的问题。

In my case, I have several virtual.network adapters.就我而言,我有几个 virtual.network 适配器。 disabling those virtual adapters solved the problem.禁用这些虚拟适配器解决了这个问题。

If you could not solve the problem, and you need to connect your smart phone to your pc, you can always do this:如果您无法解决问题,并且需要将智能手机连接到 PC,您可以随时执行以下操作:

in android SDK folder inside of "platform-tools" folder, open cmd在“platform-tools”文件夹内的 android SDK 文件夹中,打开 cmd

Connect the device and the computer to the same Wi-Fi network将设备和计算机连接到同一个 Wi-Fi 网络

Plug the device to the computer with a USB cable to configure the connection使用 USB 电缆将设备插入计算机以配置连接

On the computer command line type: adb tcpip 5555在电脑命令行输入:adb tcpip 5555

On the computer command line type: adb shell ip addr show wlan0 and copy the IP address after the "inet" until the "/".在电脑命令行输入:adb shell ip addr show wlan0 并复制“inet”后面的IP地址直到“/”。 You can also go inside the Settings of the device to retrieve the IP address in Settings → About → Status.您也可以在设备设置中的 go 在设置 → 关于 → 状态中检索 IP 地址。

On the computer command line type: adb connect ip-address-of-device:5555在电脑命令行输入:adb connect ip-address-of-device:5555

have you tried USB?你试过 USB 吗? Wifi might work if you have the code you can scan it with your phone.如果您有可以用手机扫描的代码,则 Wifi 可能会起作用。

Facing the same problem.面临同样的问题。 I think it's an issue as of now as Bumblebee update is just a few days old, and it will be resolved in later updates.我认为这是一个问题,因为 Bumblebee 更新才几天,将在以后的更新中解决。
Until then you can try using the other method ie pairing with OTP.在此之前,您可以尝试使用其他方法,即与 OTP 配对。 It's mentioned in the official documentation as well.官方文档中也提到了。 I tried it and it's working fine for me.我试过了,它对我来说很好用。

Connect to a device over Wi-Fi (Android 11+) 通过 Wi-Fi 连接到设备 (Android 11+)

It is mentioned in the last step with an image of how pairing with OTP would give a successful response once paired.在最后一步中提到了与 OTP 配对如何在配对后给出成功响应的图像。 Also your workstation name will start displaying in your Android Device once paired successfully.配对成功后,您的工作站名称也将开始显示在您的 Android 设备中。

After that you just need to type this command in your terminal (as mentioned in @Ali Salehi's answer)-之后,您只需要在终端中输入此命令(如@Ali Salehi 的回答中所述) -
adb connect ipaddr:port
[where ipaddr = IP Address, port = Port No., visible in the Wireless debugging option in our phone.] [其中 ipaddr = IP 地址,端口 = 端口号,在我们手机的无线调试选项中可见。]

Your device will then be visible in the Device Manager and apps will get installed directly over Wi-Fi!然后,您的设备将在设备管理器中可见,并且应用程序将直接通过 Wi-Fi 安装!

Recently I updated my android build tools to version 32.1.0-rc1 and the problem where gone最近我将我的 android 构建工具更新到版本32.1.0-rc1并且问题消失了

SOLVED解决了

Go to Settings->Build->Debugger-> ADB Go 到Settings->Build->Debugger->ADB

and set Automatically start and manage server .并设置自动启动和管理服务器

You must have changed it to a manual value (second option) which causes that pop-up showing 'system does not meet requirement'您必须将其更改为手动值(第二个选项),这会导致弹出窗口显示“系统不符合要求”

在此处输入图像描述

may install fail.可能安装失败。 you should download it by yourself.你应该自己下载。platform-tools平台工具

then Connect to your device using Wi-Fi.然后使用 Wi-Fi 连接到您的设备。 May could not find devices可能找不到设备

you should update PATH if you are WIN如果你赢了,你应该更新 PATH

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM