7

According to the doc: Packing wearable Apps I am using the following code:

dependencies 
{
  compile 'com.google.android.gms:play-services:5.0.+@aar'
  compile 'com.android.support:support-v4:20.0.+''
  wearApp project(':wearable')
}

I have generated the release version using the Generate Signed APK. The first time when I install the apk the android wear app is installed properly things are working as required.

I uninstall the app from my mobile. The android wear app also gets uninstalled without any issues, but if I install the app again in my mobile, I don't see the app in the android wear. I am not sure why this is happening. I have tried the same with different apps that that are compatible with android wear those work fine. Install and uninstall and install again, I can see them on android wear emulator.

Here is the build.gradle file from my Application folder:

apply plugin: 'com.android.application'

android {
compileSdkVersion 20
buildToolsVersion '20.0.0'

defaultConfig {
    applicationId "com.ysk.notes"
    minSdkVersion 9
    targetSdkVersion 20
    versionCode 3
    versionName "1.02"
}
buildTypes {
    release {
        runProguard true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
 }
}

dependencies
      {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        compile project(':FacebookSDK')
        compile files('libs/activation.jar')
        compile files('libs/additionnal.jar')
        compile files('libs/mail.jar')
        compile 'com.google.android.gms:play-services:5.0.+@aar'
        compile 'com.android.support:support-v4:20.0.+'
        wearApp project(':Wearable')




        configurations
                {
                    all*.exclude group: 'com.android.support', module: 'support-v4'
                }
    }

Can somebody let me know where I am going wrong?

TheDevMan
  • 5,914
  • 12
  • 74
  • 144
  • Have you tried the Resync apps option from the Android Wear App, I've noticed sometimes I've needed to do this when going through a frequent install/uninstall session. – CodeChimp Jul 17 '14 at 08:44
  • I tried it. It is the same. It doesn't happen with Contacts+, CloudMagic and more apps that I have tried. I have installed and uninstalled more than 10 times.. I don't see that issue like what I am facing with my App? if it is OK, can you share your build.gradle for both Mobile and wearable? Thanks! – TheDevMan Jul 17 '14 at 08:48
  • The only difference I can see is that I don't use Proguard so maybe try turning that off temporarily? – CodeChimp Jul 17 '14 at 09:16
  • Tried.. No difference :( – TheDevMan Jul 17 '14 at 09:31
  • 1
    Check this question and my answer (it is required by a signed apk) http://stackoverflow.com/questions/24685845/android-wear-app-not-installed/24688363#24688363 – Gabriele Mariotti Jul 17 '14 at 15:03
  • @GabrieleMariotti Thanks for the quick reply, According to the SO question the app doesn't install automatically but in my case when I install the app the first time the app installs automatically and after I uninstall and install the app again it doesn't work. – TheDevMan Jul 17 '14 at 15:36
  • I have this exact same problem - any resolutions yet? – DeNitE Appz Sep 21 '16 at 14:15

3 Answers3

1

I had this problem where the wear app wouldn't install. So I made sure the mobile app was installed (after exporting singed APK and doing an ADB INSTALL), then opened the Android Wear app, pressed the gears icon at the top and then selected Resync apps.

Gregg Reno
  • 441
  • 4
  • 15
1

I have two suggestions for you that may help.

1) You mention you're using the wear emulator instead of a real watch device. I have experienced issues with connecting and syncing the emulator. Try resetting the emulator and reconnecting through Android Wear on your phone (aka running adb -d forward tcp:5601 tcp:5601) again.

2) There seems to be some caching of versionCode on the Phone and it uses that to know if it needs to resync and update the app on the watch. Try incrementing your versionCode and see if that helps.

Hope one of those helps.

0

Try unpair and restore factory rest .

It will solve the problems and sync all the data.

It worked for me

noobEinstien
  • 3,147
  • 4
  • 24
  • 42