1

I am working on a watch app which also has a handheld app. Requirement is that watch app should install automatically onto watch once app is installed on the phone. But unfortunately, I am not able to get that done.

I know I need to do a release APK. I have been trying to do same but still not able to get it done. I also uploaded app on google play store to see if that can help me but still no luck can anyone let me know what I am doing wrong. Have been stuck on this for last few weeks any kind of help will be really appreciated.

Here is my Phone app gradle

compileSdkVersion 25
buildToolsVersion "25.0.3"
useLibrary 'org.apache.http.legacy'

defaultConfig {
    // office id
    applicationId "appid"
    minSdkVersion 15
    targetSdkVersion 23
    multiDexEnabled true
    versionCode 8
    versionName "1.0.7"
}
buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.release
    }
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':ImageGrid')
wearApp project(':wear')
compile 'com.google.android.gms:play-services-wearable:10.0.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.tf.library.tabs:tftabs:2.1.0'
compile 'com.soundcloud.android:android-crop:1.0.1@aar'
compile 'com.shaishavgandhi:login-buttons:0.1.1'
compile 'com.jakewharton:butterknife:8.5.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'it.sephiroth.android.library.picasso:picasso:2.5.2.2'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:gridlayout-v7:25.3.1'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.6.0'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.android.gms:play-services-location:10.0.1'

//CHAT UI
compile 'hani.momanii.supernova_emoji_library:supernova-emoji-library:0.0.2'
compile 'me.himanshusoni.chatmessageview:chat-message-view:1.0.3'

// AUTH
compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.0'

//DATABASE FIREBASE,UI
compile 'com.google.firebase:firebase-database:10.0.0'
compile 'com.firebaseui:firebase-ui-database:1.0.1'

//STORAGE FIREBASE
compile 'com.google.firebase:firebase-storage:10.0.0'

//Places SERVICES
compile 'com.google.android.gms:play-services-places:10.0.1'


compile 'com.google.firebase:firebase-messaging:10.0.0'
compile 'com.google.firebase:firebase-crash:10.0.0'
compile 'com.android.support:multidex:1.0.0'

// compile 'com.google.android.gms:play-services-maps:9.6.1' // compile 'com.google.android.gms:play-services:8.4.0'

compile 'org.jsoup:jsoup:1.8.3'
compile 'com.victor:lib:1.0.1'
compile 'com.github.myinnos:AwesomeImagePicker:1.0.1'
compile 'com.adityak:browsemyfiles:1.4'
compile 'id.zelory:compressor:1.0.4'

compile files('libs/aspectjrt-1.7.3.jar')
compile files('libs/isoparser-1.0.6.jar')

}

And this is my wear app gradle file

compileSdkVersion 25
buildToolsVersion "25.0.3"

defaultConfig {
    applicationId "appid"
    minSdkVersion 18

    targetSdkVersion 22
    versionCode 7
    versionName "1.0.6"
}
buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v13:25.3.1'
provided 'com.google.android.wearable:wearable:2.0.3'
compile 'com.google.android.support:wearable:2.0.3'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'com.google.android.gms:play-services-wearable:10.0.1'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.6.0'

}

Just to make sure it work I have package name for both app and wearable same

Please help me on this.

Thank you

MαπμQμαπkγVπ.0
  • 5,887
  • 1
  • 27
  • 65
Android
  • 1,085
  • 4
  • 13
  • 28

1 Answers1

0

As stated in this thread, try to check your permissions. The Smartphone part needs to have all the permissions the Wear component has.

You may also check this post for reference.

...in build.gradle file of your phone app, you should mention the exact name of the wear app folder. If you created the project in Android Studio, then your build.gradle should look like this:

                      wearApp project(':wear')

This can happen because of the following reasons:

  • Wear & Mobile app's "permissions" are not same.
  • Package name of Wear & Mobile apps are not matching.
  • Application ID (build.gradle file) of Mobile & wear app are not matching.
  • Asset Compression

Hope this helps!

abielita
  • 13,147
  • 2
  • 17
  • 59
  • These are the only 2 things in my wear app manifest i have internet permission in my app too Application ID is same Package name is same – Android Oct 10 '17 at 18:07