如何使用 Wea​​r OS 应用程序将 avd Wear 模拟器与我的手机连接?

发布于 2025-01-10 12:25:30 字数 280 浏览 0 评论 0原文

我需要将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

何其悲哀 2025-01-17 12:25:30

您可以使用 Android Studio 配对助手。

来自文档:

从 Android Studio 的设备下拉列表中,单击 Wear OS 模拟器
配对助手。选择一部手机和一个 Wear AVD 进行配对
其他。如果没有可用的,请单击“查看 AVD 管理器”以设置
电话或观看 AVD。然后单击“下一步”。

Android Studio 尝试启动并在两者之间建立桥梁
设备。如果您的手机上没有安装Wear OS应用程序,
系统将提示您从 Play 下载 Companion 应用程序
商店。

如果出现提示,请在下载后打开 Companion 应用程序。上
手机在 Wear OS 应用程序中开始标准配对过程。为了
例如,在欢迎屏幕上,点击设置按钮。
或者,如果现有手表已配对,则在上部
在左侧下拉列表中,点击添加新手表。在手机上的 Wear OS 应用程序中,
点击“溢出”按钮,然后点击“与模拟器配对”。

https://developer.android.com/training/wearables/ get-started/creating#pairing-assistant

此功能仅适用于 Android 11+

You can use Android Studio pairing assistant.

From document:

From the device dropdown in Android Studio, click Wear OS emulator
pairing assistant. Select a phone and a Wear AVD to pair with one
another. If none are available, click View AVD Manager to set up a
phone or watch AVD. Then click Next.

Android Studio attempts to launch and set up a bridge between the two
devices. If you do not have the Wear OS app installed on the phone,
you will be prompted to download the Companion app from the Play
Store.

If prompted, open the Companion app once it is downloaded. On the
phone, in the Wear OS app, begin the standard pairing process. For
example, on the welcome screen, tap the Set It Up button.
Alternatively, if an existing watch is already paired, in the upper
left drop-down, tap Add a New Watch. On the phone, in the Wear OS app,
tap the Overflow button, and then tap Pair with Emulator.

https://developer.android.com/training/wearables/get-started/creating#pairing-assistant

This feature is only available for Android 11+

埋情葬爱 2025-01-17 12:25:30

终于成功了。我在我的 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.

伊面 2025-01-17 12:25:30

要连接到真实的电话流程,请执行以下步骤 AVD
如果您想要在手表 AVD 上使用 Google 帐户进行开发,您可以将手机与手表 AVD 配对并通过执行以下操作同步 Google 帐户:

按照步骤设置手机。

  1. 在手机上启用“开发者选项”和“USB 调试”。

  2. 通过USB将手机连接至电脑。

  3. 将 AVD 的通信端口转发到每个连接的手机
    使用此命令连接手机的时间:

    adb -d 转发 tcp:5601 tcp:5601

  4. 在手机上的 Wear OS 配套应用程序中,开始标准操作
    配对过程。例如,在欢迎屏幕上,点击设置
    向上按钮。或者,如果现有手表已配对,
    点击左上角菜单中的“添加新手表”。

  5. 在手机上的 Wear OS 配套应用中,点按溢出菜单,
    然后点击与模拟器配对。

  6. 点击“设置”图标。

  7. 在“设备设置”下,点击“模拟器”。

  8. 点按“帐户”并选择一个 Google 帐户。

  9. 按照向导中的步骤将帐户与
    模拟器。如有必要,请输入屏幕锁定设备密码并
    用于启动帐户同步的 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.

  1. On the phone, enable Developer Options and USB Debugging.

  2. Connect the phone to your computer through USB.

  3. 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

  4. 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.

  5. In the Wear OS companion app on the phone, tap the overflow menu,
    and then tap Pair with Emulator.

  6. Tap the Settings icon.

  7. Under Device Settings, tap Emulator.

  8. Tap Accounts and select a Google account.

  9. 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文