Troubleshooting Hi, World Watch app in Android Studio

When deploying the wear version of the included Hello, World watch application in Android Studio, I get this error: Error [INSTALL_FAILED_OLDER_SDK]

Update: Removing information about an attempted hacked version of L from a Reddit post, as this is not a solution for me, and this may have created more confusion.

mobile / build.gradle

apply plugin: 'com.android.application' android { compileSdkVersion 20 buildToolsVersion "20.0.0" defaultConfig { applicationId "com.example.erikbabel.myapplication" minSdkVersion 15 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']) wearApp project(':wear') compile 'com.android.support:appcompat-v7:19.+' compile 'com.google.android.gms:play-services-wearable:+' } 

clothes / build.gradle

 apply plugin: 'com.android.application' android { compileSdkVersion 20 buildToolsVersion "20.0.0" defaultConfig { applicationId "com.example.erikbabel.myapplication" 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:+' compile 'com.google.android.gms:play-services-wearable:+' } 

Everything else is untouched from the new draft directions . I work on my Moto Ultra 4.4 and LG G watches.

+3
source share
2 answers

The error [INSTALL_FAILED_OLDER_SDK] is that I deployed the gradle build wear to the phone (which has an incompatible api). To deploy the downloadable gradle design to your LG G watch, you need to enable bluetooth debugging and connect your adb to the watch. Then select the clock in the "Select Device" dialog box.

+4
source

The OP solved this problem, noting that the downloadable application can be deployed directly to the wearable device for debugging, but not for the phone. Another option is to pack the downloadable application inside the handheld application and deploy the handheld application on the phone. This will cause the portable application to be deployed to the wearable device paired with the phone. Starting with this writing, this is the only way to enable the boot application on the Play Store.

When publishing to users, you must package the downloadable application inside the portable application, since users cannot view and install applications directly on wearables. If the package is correctly packaged when users download the handheld application, the system automatically pushes the downloaded application to a paired wearable.

Note. This feature does not work when you sign your applications using the debug key during development. When developing, you need to install applications with adb or Android Studio installed directly on wearables.

Source: https://developer.android.com/training/wearables/apps/packaging.html

0
source

Source: https://habr.com/ru/post/971987/


All Articles