Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Project depends on com.google.android.support:wearable:2.0.2

I've created a demo wear project with android studio without touching anything. In build.Gradle this error occurs, although I find curious that it lets the app compile.

Project depends on com.google.android.support:wearable:2.0.2, so it must also depend (as a provided dependency) on com.google.android.wearable:wearable:2.0.2

enter image description here

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])

    compile 'com.google.android.support:wearable:1.4.0'
    compile 'com.google.android.gms:play-services-wearable:9.4.0'
}
like image 551
user2983041 Avatar asked Jun 12 '17 13:06

user2983041


1 Answers

Just add

provided com.google.android.wearable:wearable:2.0.2

to your dependencies

EDIT:

provided is deprecated now, use compileOnly like so:

compileOnly com.google.android.wearable:wearable:2.0.2

like image 61
Jozef Dochan Avatar answered Nov 16 '22 03:11

Jozef Dochan