“不,缺少功能:手表"当我尝试使用 Wea​​r 应用程序运行我的智能手机应用程序时? [英] "No, missing feature: WATCH" when I try to run my smartphone app with wear app?

查看:24
本文介绍了“不,缺少功能:手表"当我尝试使用 Wea​​r 应用程序运行我的智能手机应用程序时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个智能手机应用程序,其中包含一个 Wear 应用程序,类似于本节的前两个步骤:

I have a smartphone app with a wear app that has been packaged inside of it, similar to the first two steps of this section:

https://developer.android.com/training/wearables/apps/packaging.html#Studio

我最初被告知我的智能手机没有运行足够大的 SDK 来支持该应用程序(我的手机使用的是 KitKat,显然我需要 API 20),所以现在我使用的是带有 Android L 预览版的 Nexus 7,并且出现了这个问题:

I was originally told that my smartphone wasn't running an SDK large enough to support the app (my phone was using KitKat, apparently I needed API 20), so now I am using my Nexus 7 with Android L preview, and this problem has appeared:

我有一个智能手表模拟器和平板电脑正在运行,两者都使用 adb -d forward tcp:5601 tcp:5601 技巧连接,所以我现在不知道如何解决这个问题!

I have a smartwatch emulator and tablet running, and both are connected using the adb -d forward tcp:5601 tcp:5601 trick, so I have no idea how to fix this now!

如何让智能手机应用程序运行并自动允许穿戴应用程序安装到模拟器上?

How can I get the smartphone app to run and automatically allow the wear app to install onto the emulator?

推荐答案

在您的项目中,您有两个应用程序:

In your project you have two applications:

  • 移动
  • 可穿戴


Mobile 应用应安装在移动设备(手机/平板电脑)上,Wearable 应用应安装在 Android Wear 设备上.


Mobile app should be installed on mobile device (phone/tablet) and Wearable app should be installed on Android Wear device.

此消息 No, missing feature: WATCH 表示您正在尝试在手机上安装 Wearable 应用 - 您不应该这样做,您的移动设备是不是手表.所以再次重申:只需在移动设备上启动 Mobile 应用,在 Android Wear 上启动 Wearable 应用.

This message No, missing feature: WATCH means that you're trying to install Wearable app on mobile phone - you shouldn't do that, your mobile device is not a WATCH. So once again: just launch Mobile app on mobile and Wearable app on Android Wear.

我最初被告知我的智能手机没有运行大型 SDK足以支持该应用程序(我的手机使用的是 KitKat,显然我需要 API 20),所以现在我将 Nexus 7 与 Android L 预览版一起使用,并且出现了这个问题:

I was originally told that my smartphone wasn't running an SDK large enough to support the app (my phone was using KitKat, apparently I needed API 20), so now I am using my Nexus 7 with Android L preview, and this problem has appeared:

只有 Wearable 应用需要 API 级别 20,但 Mobile 应用可以针对任何其他 SDK 级别(如 10、14 等).您不需要为Mobile 应用设置更高的SDK 级别,因为它支持Wearable 应用.

Only the Wearable app should require API level 20, but Mobile app can target any other SDK level (like 10, 14 etc.). You don't need to set higher SDK level for Mobile app only because it supports Wearable app.

如何让智能手机应用程序运行并自动允许穿戴应用安装到模拟器上?

How can I get the smartphone app to run and automatically allow the wear app to install onto the emulator?

如您链接的教程中所述:

As described in the tutorial that you've linked:

如果打包正确,当用户下载掌上APP时,系统自动将穿戴式应用推送到配对的穿戴式设备.

If packaged properly, when users download the handheld app, the system automatically pushes the wearable app to the paired wearable.

但请阅读本页顶部的说明:

But please read the note at the top of this page:

注意:当您使用开发时调试键.在开发时,使用 adb 安装应用程序需要直接安装或 Android Studio 到可穿戴设备.

Note: This feature doesn't work when you are signing your apps with a debug key when developing. While developing, installing apps with adb install or Android Studio directly to the wearable is required.

这意味着在安装 Mobile 应用程序后自动安装 Wearable 应用程序(将 Wearable 应用程序打包在里面)只有在使用您的应用程序签名后才能工作发布证书(而不是调试证书 - 正如在从 Android Studio/Eclipse 启动标准应用程序期间所做的那样).

This means that automatically installing Wearable app after installing Mobile app (with Wearable app packaged inside) will only work after signing app with your publishing certificate (and not with the debug one - as is done during standard application Launch from Android Studio/Eclipse).

这篇关于“不,缺少功能:手表"当我尝试使用 Wea​​r 应用程序运行我的智能手机应用程序时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆