Android 表盘,"not compatible with this device"。我错过了什么

Android Watch Face, "not compatible with this device". I'm missing something

好的,最近开始涉足Android开发,做了一个简单的表盘。我没有 Android 手表(或任何其他 Android 设备),所以我正在使用模拟器。

好吧,通过模拟器,表盘效果很好。所以我把它放在 Google Play 上,并请几个朋友 "beta" 帮我测试一下。

不幸的是,他们中的 none 可以在他们的手表上使用它。他们向我报告他们收到 "not compatible" 消息,因此无法安装表盘。

我在 API 21 (Lollipop) 下使用 Android Studio 开发了它。这可能是一个问题。

需要说明的是:当我设置项目时,我只是将它作为一个 "wear" 应用程序,而不是作为你放在 phone 上的应用程序。也许这是我的另一个错误。

我已经进行了大量搜索,但无法真正找到我需要在我的代码中做些什么来解决这个问题,我也不是如果这是我需要做的,我真的很确定如何在不同的 SDK 下重新编译。

对此有什么想法吗?

编辑:

根据请求,清单如下:

<?xml version="1.0" encoding="utf-8"?>

<uses-feature android:name="android.hardware.type.watch" />

<!-- Required to act as a custom watch face. -->
<uses-permission android:name="com.google.android.permission.PROVIDE_BACKGROUND" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.DeviceDefault" >
    <service
        android:name=".MorseWatchFace"
        android:label="@string/my_digital_name"
        android:permission="android.permission.BIND_WALLPAPER" >
        <meta-data
            android:name="android.service.wallpaper"
            android:resource="@xml/watch_face" />
        <meta-data
            android:name="com.google.android.wearable.watchface.preview"
            android:resource="@drawable/preview_digital" />
        <meta-data
            android:name="com.google.android.wearable.watchface.preview_circular"
            android:resource="@drawable/preview_digital_circular" />

        <intent-filter>
            <action android:name="android.service.wallpaper.WallpaperService" />

            <category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
        </intent-filter>
    </service>

    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
</application>

如果您的用户正在从他们的 phone 安装您的 apk(如果他们在 phone 上使用 Google Play 商店,他们就是这样),您必须上传phone 个 APK。

您的可穿戴设备 APK 将仅支持大约 19 种设备,这是有道理的 - 即有多少设备符合条件。 Google Play 将向定义了相同功能的设备提供 APK(请参阅 https://developer.android.com/google/play/publishing/multiple-apks.html)。因此,如果您定义了可穿戴功能,它只会针对手表。

我建议创建一个新的 phone 模块。它真正需要的只是一个基本清单(只是一个 <application> 块)和对可穿戴模块的 gradle 依赖(例如,将 wearApp project(':your-wearable-module') 行添加到 phone 模块 gradle 文件的依赖块)。然后将该模块发布到 Google Play。这个 phone apk 基本上只会在其中托管您的可穿戴 apk,以允许它安装在 phones 上。