Search code examples
androidwear-osbuild.gradle

Android wear app not being pushed to Moto 360


Hi im having problems pushing an an app to the Moto 360, I have followed this [Solution][1]

[1]: Android Wear app not installing through handset and followed the Android devolopers pages. Im not sure if the the problem is due to using Galaxy Note 2 which has SDK 19 or if im missing something.

Below is my wear build gradle

apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "20.0.0"

defaultConfig {
    applicationId ""
    minSdkVersion 20
    targetSdkVersion 20
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.support:wearable:1.0.0'
compile 'com.google.android.gms:play-services-wearable:6.1.71'
}

and my handset build gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 19
buildToolsVersion "20.0.0"

defaultConfig {
    applicationId ""
    minSdkVersion 19
    targetSdkVersion 20
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
// compile 'com.android.support:appcompat-v7:18.0.+'
compile fileTree(dir: 'libs', include: ['*.jar'])
//compile 'com.google.android.support:wearable:+'
//compile 'com.google.android.gms:play-services-wearable:+'
compile files('libs/gson-2.3.jar')
compile files('libs/jericho-html-3.3.jar')
compile files('libs/jsoup-1.8.1.jar')
compile files('libs/android-rss.jar')
compile files('libs/volley.jar')
compile files('libs/localytics-2.6.jar')
compile 'com.android.support:appcompat-v7:21.0.0'
compile project(':facebook')
compile 'com.android.support:support-v4:20.0.+'
compile files('libs/localytics.jar')
wearApp project(':wear')

}

Any help would be gratefully appreciated. Thank you .


Solution

  • The problem was related to Samsung Galaxy Note 2, for some reason it was in Emulator mode on the Android wear app and it wouldn't allow me to switch to the Watch mode, which meant it wouldn't allow a bluetooth connection to the Moto 360. I got a Nexus 5 and it was all sorted..

    By adding the following commands in the terminal allows the connection to the Moto 360 from your phone..

    adb forward tcp:4444 localabstract:/adb-hub adb connect localhost:4444

    I hope this helps..

    For more information on configuring a bluetooth debug connection for devices without USB connection and some more instructions on what to look for in logging also check Wearable app does not install from mobile apk

    And for more instructions on what could prevent the wearable part of an app to be installed also check Android Wear app not installing through handset