[英]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 所有的教程和答案(例如this或this )基本上都描述了
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.