onigunn
onigunn

Reputation: 4788

Android Wear App not installed

we release our first Wearable Application today but sadly this one isn't get installed automatically as it should.

We double checked the APK and the wearable apk is present but never hits the watch. Manually packaging the APK as suggested here http://android-developers.blogspot.de/2014/07/update-on-android-wear-paid-apps.html doesn't helped either. (We know this should only affect paid apps but just to be sure)

Is anybody else facing this issue? The app works if we install the APKs over adb.

Upvotes: 21

Views: 12367

Answers (7)

Alberto Perez
Alberto Perez

Reputation: 1077

I had a problem with installing an app, i think because my watch reset when it was installing. I had to desvinculate the watch, after reinstall everything it works. Maybe help someone

Upvotes: 0

zhicong
zhicong

Reputation: 171

What worked for me was removing product flavors. Sucks that I can't have flavor-specific code now, but Android refuses to package the wear app in release otherwise.

See: Android Wear app not installing through handset

Upvotes: 3

N1234
N1234

Reputation: 588

This is going to sound like such a basic and silly answer. But when I did my tests, I forgot that in Android Studios where you click on the play button to run your app, you can change it from mobile to wear. I was only ever installing the mobile app and not the wear app on the wear device.

Hope this helps someone.

Upvotes: -1

barkside
barkside

Reputation: 3971

I spend ages on this. The wearApp gradle rule worked fine for me. But then for the Paid version of the app, following the guide on the blog to manually package the wear app, it wouldn't auto-load on the wearable. After lots of checking, I found that the wearApp gradle rule (on Android Studio 0.8.2), did actually place the wearable APK in the raw folder as per the blog post fix. So seems to be fixed in latest Android Studio (without being told?). And for some reason, manually packaging the APKs didn't work.

So use the wearApp gradle rule.

Also, if you need to reference a different version of the wear APK for different handheld APK versions (for free and pro versions to have applicationId that matches the wearable version), use the productFlavors in the wear gradle config:

productFlavors {
    freeapp {
        applicationId "com.barkside.appfree"
    }

    proapp {
        applicationId "com.barkside.apppro"
    }
}

Then in your Pro version gradle (for example), have the wearApp dependency target a particular configuration:

wearApp project(path: ':wear', configuration: 'proappRelease')

You will also need publishNonDefault true in the android block of the wear gradle.

Upvotes: 8

Oleksiy Martynov
Oleksiy Martynov

Reputation: 379

Had the same problem, what helped me was adding

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

To the mobiles manifest.

Upvotes: 6

Wayne Piekarski
Wayne Piekarski

Reputation: 3232

You should check adb logcat on both devices to see what is going on. It will give error messages to indicate what problem might be happening.

Also, when you are testing locally, you should only adb install the phone APK to the phone, and let it install the embedded APK to the wearable device. Then you don't need to go all the way through the play store for testing. Make sure you do release builds, because those are the only ones that do the embedded APK with the wearApp() gradle rule.

Upvotes: 1

Gabriele Mariotti
Gabriele Mariotti

Reputation: 364780

  • Check your permissions. The Smartphone part needs to have all the permissions the Wear component has.
  • use the same package id for both apps (wear and mobile)

Upvotes: 22

Related Questions