如何让 Android Wear Watchface 可从 phone 安装?

How to make an Android Wear Watchface installable from the phone?

所以我做了一个表盘,我想把它放在 Play 商店上。我部分做到了。当我使用 phone 进入 Play 商店的应用程序页面时,它说我的设备不兼容。我知道这是因为它在清单中如此说明。

通常我在我的 phone 上浏览 Play 商店寻找表盘,安装我喜欢的那个,它最终出现在我的手表上(phone 上没有配套应用)。

所以我需要做哪些更改才能在 Phone 上安装它。 我可以提供什么让您更轻松地帮助我?

我假设您的表盘是一个独立的应用程序,即它不需要在 phone 上也安装一个应用程序。如果您不确定,请查看 documentation.

中的 "Specify an app as standalone" 部分

Android Wear 2.x 及更高版本(包括 Wear OS)的独立应用程序无法通过 phone 安装。您有两个选择:

  1. 在可穿戴设备上使用 Play 商店应用程序
  2. 转到 Play 商店桌面网站,select将您的可穿戴设备作为安装目标

换句话说,您遇到的是预期行为

如果您确实希望从 phone 安装您的应用(或者如果您的目标是 Android Wear 1.x),则它必须具有 phone应用程序。来自文档:

对于磨损 2.0

On devices running Wear 2.0, when a user installs a phone app that has an associated watch app (either an embedded APK or an APK uploaded via the Play Console), the user gets a watch notification about the available watch app. Tapping the notification opens the watch Play Store, giving the user the option to install the watch app.

对于磨损 1.0

Wear OS now allows you to distribute your Wear app the same way for both Wear 1.0 and 2.0. When a user installs your phone app, if you have a compatible Wear app in the Play Store, it will automatically be installed on Wear 1.0 watches.

但是,我强烈建议不要仅仅为了在 phone 上被发现而这样做。