简体   繁体   English

如何将在模拟器中运行的Android Wear连接到真实的Android设备(2016)

[英]How to Connect Android Wear running in Emulator to a real Android Device (2016)

I know there are some questions on this topic, but most answers are from 2014 and not applicable anymore :( 我知道有关此主题的问题,但大多数答案来自2014年,不再适用:(

How do I connect Android Wear running in the Emulator to an Android 6.0 device hanging via USB on the same Machine, with ADB on, on both Instances. 如何将在模拟器中运行的Android Wear连接到通过USB挂在同一台计算机上且两个实例上都具有ADB的Android 6.0设备。 I can see both devices if I do adb devices 如果我使用adb devices则可以看到两个adb devices

All the tutorials and answers (like this or this ) describe basically to do 所有的教程和答案(例如thisthis )基本上都描述了

adb -d forward tcp:5601 tcp:5601

or 要么

adb -s emulator-555X forward tcp:5601 tcp:5601

and to start the pairing with the Emulator from a slightly hidden option in the Android Wear App - However, I can't find this option in 2016's Android Wear App anymore. 并从Android Wear应用程序中一个稍微隐藏的选项开始与模拟器配对- 但是,我再也无法在2016年的Android Wear App中找到此选项。

I'm screwing around with this for two hours, can someone please help? 我要花两个小时,有人可以帮忙吗? Thanks! 谢谢!

You have the command-line option right: 您拥有正确的命令行选项:

adb -d forward tcp:5601 tcp:5601

Then in the Android Wear app on your phone, go to Pair with a new watch (under the device dropdown at the upper-left of the main activity); 然后在手机上的Android Wear应用中,转到与新手表配对 (在主活动的左上角的设备下拉菜单下); on the Pair with your watch screen, you'll find Pair with emulator on the overflow (3 dots) menu. 在“ 与手表配对”屏幕上,您会在溢出(3点)菜单上找到与模拟器配对

UPDATE MARCH 2019 2019年3月更新

The phone app is now called Wear OS, of course, but the steps are much the same. 当然,该电话应用程序现在称为Wear OS,但步骤大致相同。 During the Add a Watch process (including during initial setup), Pair with emulator should be in the ⋮ overflow menu on the Connect your Watch screen. 在“ 添加手表”过程中(包括在初始设置期间),“ 与模拟器配对”应位于“ 连接手表”屏幕上的⋮溢出菜单中。

The ADB command has never changed, and is documented here . ADB命令从未更改过, 在此处进行了说明

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

相关问题 无法将 Android Wear 模拟器与设备连接 - Not able to connect Android Wear Emulator with Device 通过ADB Connect将设备与Android Wear模拟器连接 - Connect Device with Android wear emulator over adb connect 是否可以将磨损模拟器连接到Android ICS 4.0设备? - Is it possible to connect wear emulator to android ICS 4.0 device? Android 应用程序不在模拟器上运行,而是在真实设备上运行 - Android App NOT Running on Emulator, but on real device Android Instrumental Test 在模拟器上运行但不在真实设备上 - Android Instrumental Test running on Emulator but not on real device Android应用未在模拟器上运行,也未在真实设备上运行 - Android app not running on emulator nor real device Android Wear,连接到蓝牙设备 - Android Wear, connect to bluetooth device 如何通过 Android 移动设备安装 apk Wear 模拟器 - How to install apk wear emulator via Android mobile device Android:构建Android应用程序以检查应用程序是否在模拟器或真实设备上运行 - Android: build android application to check app is running at emulator or real device 如何选择与真实设备匹配的Android模拟器 - how to choose an android emulator that match real device
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM