Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android studio error : missing feature: WATCH

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

enter image description here

my smartwatch runs android 4.4.2 which has API level 19

things I have tried and didn't help:

  1. change Min Sdk Version to API 19

  2. 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. instead of removing

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

I have tried changing it to:

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

but i have the same result

like image 713
E.Volt Avatar asked Mar 04 '17 14:03

E.Volt


3 Answers

Having the element

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

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.

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

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

like image 75
Sterling Avatar answered Oct 25 '22 10:10

Sterling


I solved it like this

You just need to remove the following tags from the manifest

<uses-library android:name="com.google.android.wearable" android:required="false" />


tools:ignore="GoogleAppIndexingWarning"


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

I hope you solve problem

like image 35
habeeb mahran Avatar answered Oct 25 '22 10:10

habeeb mahran


You need to change your app to support cpu architecture and so on. I copy a part form the link below. read for more information.

Supporting multiple CPU architectures

When using the Android NDK, you can create a single APK that supports multiple CPU architectures by declaring each of the desired architectures with the APP_ABI variable in the Application.mk file.

For example, here's an Application.mk file that declares support for three different CPU architectures:

APP_ABI := armeabi armeabi-v7a mips APP_PLATFORM := android-9

EDIT:

enter image description here

like image 39
Mehran Zamani Avatar answered Oct 25 '22 09:10

Mehran Zamani