Android Studio错误:缺少功能:WATCH [英] android studio error : missing feature: WATCH

查看:593
本文介绍了Android Studio错误:缺少功能:WATCH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在smartwatch上使用android studio运行一个简单的应用程序,并且收到以下消息:

I have tried to run one simple application with android studio on my smartwatch and I've got the following message:

我的smartwatch运行具有API级别19的android 4.4.2

my smartwatch runs android 4.4.2 which has API level 19

我尝试过但没有帮助的事情:

things I have tried and didn't help:

  1. 将Min Sdk版本更改为API 19

  1. change Min Sdk Version to API 19

从androidManifest中删除< uses-feature android:name="android.hardware.type.watch" />

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

-该应用已安装,但是当我尝试从手表运行该应用时,出现错误:不幸的是,我的应用已停止. 我的应用程序崩溃时的日志记录

-the app is installed but when i try to run it from the watch i get the error: Unfortunately , My Application has stopped. logcat when my app crases

  1. 而不是删除

  1. instead of removing

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

我尝试将其更改为:

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

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

但是我有相同的结果

推荐答案

具有元素

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

清单中的

被Android Studio表示是Android Wear应用-您的D5手表未运行Android Wear.是的,它是运行Android的智能手表,但是Wear专门针对Google专有(不是开源)的一组增强功能来存储Android-D5没有这些功能.

in your manifest is taken by Android Studio to mean that this is an Android Wear app - and your D5 watch doesn't run Android Wear. Yes, it's a smartwatch running Android, but Wear is specifically a set of Google-proprietary (not open-source) enhancements to stock Android - and the D5 doesn't have them.

在我的测试中,将其标记为android:required="false"允许将应用程序部署到非穿戴设备.我不确定为什么这对您不起作用;也许与Android Studio版本有关(我正在使用v2.3).

In my testing, flagging it with android:required="false" allowed the app to be deployed to a non-Wear device. I'm not sure why this didn't work for you; perhaps it's to do with Android Studio versions (I'm using v2.3).

但是无论如何,如果删除该元素,则该应用程序应部署在D5上.

But in any case, if you remove that element, the app should deploy on your D5.

这篇关于Android Studio错误:缺少功能:WATCH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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