项目取决于com.google.android.support:wearable:2.0.2

时间:2017-06-12 13:31:41

标签: android android-gradle wear-os

我用android studio创建了一个演示服装项目而没有触及任何东西。在build.Gradle中发生了这个错误,虽然我很好奇它让应用程序编译。

  

项目取决于com.google.android.support:wearable:2.0.2,所以它   还必须依赖(作为提供的依赖)   com.google.android.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'
}

1 个答案:

答案 0 :(得分:9)

添加

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

到您的依赖项

修改

provided现已弃用,请使用compileOnly,如下所示:

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