无法将 Android Wear 模拟器与设备连接
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22524760/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Not able to connect Android Wear Emulator with Device
提问by Siddharth_Vyas
I am not able to connect Android Wear Emulator with my device.I have HTC One device which has 4.4 (KitKat OS).
我无法将 Android Wear Emulator 与我的设备连接。我有 HTC One 设备,它有 4.4 (KitKat OS)。
I follow below link :
我按照以下链接:
But, when I execute the line adb -d forward tcp:5601 tcp:5601through command prompt,nothing happens.Android Wear emulator does not show device connected.
但是,当我通过命令提示符执行adb -d forward tcp:5601 tcp:5601行时,没有任何反应。Android Wear 模拟器不显示设备已连接。
Note: I am able to launch the Android Wear Preview appsuccessfully in my device and Notifications settings is also enabled.
注意:我能够在我的设备中成功启动Android Wear Preview 应用程序,并且通知设置也已启用。
Any help will be appreciated.
任何帮助将不胜感激。
回答by Liangjun
@Lance Nanek basically helped me solved this problem. In case you had the similar problem, these steps might be helpful.
@Lance Nanek 基本上帮我解决了这个问题。如果您遇到类似问题,这些步骤可能会有所帮助。
run 'adb devices' , you should see two devices, one is your emulator, the other is your device with Android Wear Preview app installed.
you might see your emulator offline, if so, kill the emulator. From avd, start it, carefully uncheck 'launch from snapshot' - this is contrast to Android Wear Get started instruction: "Start the AVD again, but select Launch from snapshot and deselect Save to snapshot."
- run 'adb devices' again, make sure you do see two devices online
- run command 'adb -d forward tcp:5601 tcp:5601'
- from the android wear preview app, tape connect, you should be ready to go.
运行 'adb devices' ,您应该会看到两台设备,一台是您的模拟器,另一台是您安装了 Android Wear Preview 应用程序的设备。
您可能会看到您的模拟器离线,如果是这样,请杀死模拟器。从 avd 启动它,小心地取消选中“从快照启动”——这与 Android Wear 入门说明形成对比:“再次启动 AVD,但选择从快照启动并取消选择保存到快照。”
- 再次运行“adb devices”,确保您确实看到了两个在线设备
- 运行命令'adb -d forward tcp:5601 tcp:5601'
- 从 android 磨损预览应用程序,磁带连接,你应该准备好了。
回答by Morne
On the newly updated Android Wear app (Aug 2014) there is a settings button top right when asked to choose a device connected via bluetooth. Pressing this button will connect to an emulator instead.
在新更新的 Android Wear 应用程序(2014 年 8 月)上,当被要求选择通过蓝牙连接的设备时,右上角有一个设置按钮。按此按钮将改为连接到仿真器。
回答by Erik B
- Enable adb debugging in the developer options on your watch.
- Enable bluetooth debugging in the developer options on your watch.
- Enable bluetooth debugging in the wear app on your phone. run in terminal:
- adb forward tcp:4444 localabstract:/adb-hub; adb connect localhost:4444
- 在手表的开发者选项中启用 adb 调试。
- 在手表的开发者选项中启用蓝牙调试。
- 在手机上的 Wear 应用程序中启用蓝牙调试。在终端运行:
- adb forward tcp:4444 localabstract:/adb-hub; 亚行连接本地主机:4444
I think I also had luck with using the cradle plugged directly into the computer, but unable to confirm that now.
我想我也很幸运地使用了直接插入计算机的底座,但现在无法确认。
回答by vir us
Stuck with the same a while ago. It appeared that Google updated their Android Wearapp. After installing the new version I was able to connect successfully to wear through its interface (as long as I used device with android 4.3+and adb -d forward tcp:5601 tcp:5601command)
前一阵子也被卡住了。谷歌似乎更新了他们的Android Wear应用程序。安装新版本后,我能够通过其接口成功连接(只要我使用带有android 4.3+和adb -d forward tcp:5601 tcp:5601命令的设备)
回答by raul.broto
After some hours trying to find the solution... I've found it!
几个小时后试图找到解决方案......我找到了!
In my case, the problem was that I have two different SDKs (one from Eclipse and the other from Android Studio), so I was trying to execute the ADB commands in the wrong one.
就我而言,问题是我有两个不同的 SDK(一个来自 Eclipse,另一个来自 Android Studio),所以我试图在错误的一个中执行 ADB 命令。
So it is important that you check the path you are using in your IDE and execute the commands on the same.
因此,检查您在 IDE 中使用的路径并在相同路径上执行命令非常重要。
回答by Jordan Réjaud
I was getting suck on "Connecting to Emulator", but I fixed it by using an Android Wear ARM virtual device instead of an x86 one.
我对“连接到模拟器”感到厌烦,但我通过使用 Android Wear ARM 虚拟设备而不是 x86 虚拟设备来修复它。
回答by Paul Lammertsma
The trouble I was having, was that the pre-selected API level was set incorrectly. It should be set to the following values:
我遇到的问题是预选的 API 级别设置不正确。它应该设置为以下值:


Using Host GPU is optional.
使用主机 GPU 是可选的。
回答by gandhi
Android Wear using Genymotion For people who does not have a phone with Android 4.3 or above, we can not try the Android Wear Preview. :'( And here is a way you can try, use Genymotion Nexus 4 or any other emulator with Android 4.3 or Android 4.4 and it works!
使用 Genymotion 的 Android Wear 对于没有 Android 4.3 或更高版本手机的人,我们无法尝试 Android Wear Preview。:'(这是一种您可以尝试的方法,使用 Genymotion Nexus 4 或任何其他带有 Android 4.3 或 Android 4.4 的模拟器,它可以工作!
Setup a Nexus 4 with Android 4.3 in Genymotion. Start both the Nexus 4 and Android Wear emulator. You should first install Google Play Services on the Nexus 4: Download the zip file Drag it into the Nexus 4 Reboot the device, and now you are able to install "Android Wear Preview" on Play Store Open Terminal, use adb tools: adb devices you shoud see 2 devices, adb -s [device name of Nexus 4] forward tcp:5601 tcp:5601 Done!
在 Genymotion 中使用 Android 4.3 设置 Nexus 4。启动 Nexus 4 和 Android Wear 模拟器。您应该首先在 Nexus 4 上安装 Google Play 服务: 下载 zip 文件 将其拖入 Nexus 4 重新启动设备,现在您可以在 Play Store Open Terminal 上安装“Android Wear Preview”,使用 adb 工具:adb devices你应该看到 2 个设备, adb -s [Nexus 4 的设备名称] forward tcp:5601 tcp:5601 Done!
回答by ladu
Run the adb -d forward tcp:5601 tcp:5601command in super user mode
在超级用户模式下运行adb -d forward tcp:5601 tcp:5601命令

