如何使用 Wear OS 应用程序将 avd Wear 模拟器与我的手机连接?
我需要将 avd Wear 模拟器与我的智能手机连接。当我在此处,它说进入设置,然后进入设备设置,然后点击模拟器。
我不明白它在谈论哪些设置和设备设置。我手机上的 Wear OS 应用程序不断显示“正在等待模拟器连接”。我真的很困惑。任何帮助将不胜感激。
I need to connect the avd wear emulator with my smartphone. When I searched the documentation for this here, it said to go to settings then device setting then tap emulator.
I don't understand which settings and device settings it is talking about. The Wear OS app on my phone keeps showing "waiting for the emulator to connect". I am really stuck at this. Any help would be highly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用 Android Studio 配对助手。
来自文档:
https://developer.android.com/training/wearables/ get-started/creating#pairing-assistant
此功能仅适用于 Android 11+
You can use Android Studio pairing assistant.
From document:
https://developer.android.com/training/wearables/get-started/creating#pairing-assistant
This feature is only available for Android 11+
终于成功了。我在我的 avd 模拟器中启用了开发人员选项,并从开发人员选项中启用了 adb 调试和蓝牙调试。然后按照步骤操作,avd模拟器与我的手机连接。感谢@selcukokuyucu 的帮助,但不幸的是我的智能手机中有 android 7.1.1。
It finally worked. I enabled the developer options in my avd emulator and enabled adb debugging and debugging over bluetooth from the developer options. Then followed the steps and the avd emulator connected with my phone. Thanks @selcukokuyucu for your help but unfortunately I have android 7.1.1 in my smartphone.
要连接到真实的电话流程,请执行以下步骤 AVD
如果您想要在手表 AVD 上使用 Google 帐户进行开发,您可以将手机与手表 AVD 配对并通过执行以下操作同步 Google 帐户:
按照步骤设置手机。
在手机上启用“开发者选项”和“USB 调试”。
通过USB将手机连接至电脑。
将 AVD 的通信端口转发到每个连接的手机
使用此命令连接手机的时间:
adb -d 转发 tcp:5601 tcp:5601
在手机上的 Wear OS 配套应用程序中,开始标准操作
配对过程。例如,在欢迎屏幕上,点击设置
向上按钮。或者,如果现有手表已配对,
点击左上角菜单中的“添加新手表”。
在手机上的 Wear OS 配套应用中,点按溢出菜单,
然后点击与模拟器配对。
点击“设置”图标。
在“设备设置”下,点击“模拟器”。
点按“帐户”并选择一个 Google 帐户。
按照向导中的步骤将帐户与
模拟器。如有必要,请输入屏幕锁定设备密码并
用于启动帐户同步的 Google 帐户密码。
To connect to the real phone flow this steps AVD
If you want a Google account on the watch AVD for development, you can pair a phone with the watch AVD and sync a Google account by doing the following:
Follow the steps to set up a phone.
On the phone, enable Developer Options and USB Debugging.
Connect the phone to your computer through USB.
Forward the AVD's communication port to the connected phone each
time the phone is connected using this command:
adb -d forward tcp:5601 tcp:5601
In the Wear OS companion app on the phone, begin the standard
pairing process. For example, on the Welcome screen, tap the Set It
Up button. Alternatively, if an existing watch already is paired,
tap Add a New Watch in the upper-left menu.
In the Wear OS companion app on the phone, tap the overflow menu,
and then tap Pair with Emulator.
Tap the Settings icon.
Under Device Settings, tap Emulator.
Tap Accounts and select a Google account.
Follow the steps in the wizard to sync the account with the
emulator. If necessary, type the screen-lock device password and
Google account password to start the account sync.