无法解决:com.google.android.gms:play-services-appindexing:11.0.0

时间:2017-06-19 15:42:19

标签: android

我在android studio中收到此消息: 无法解决:com.google.android.gms:play-services-appindexing:11.0.0 ... 我需要做什么?  我的Gradle:app -

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.firebase:firebase-database:11.0.1'
compile 'com.google.firebase:firebase-auth:11.0.1'
compile 'com.google.android.gms:play-services-appindexing:11.0.0'
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-core:11.0.1'
testCompile 'junit:junit:4.12'
apply plugin: 'com.google.gms.google-services'

我从一开始就收到了这条消息。 非常感谢你。

2 个答案:

答案 0 :(得分:5)

尝试更新或安装Google Repository

工具 - > SDK Manager - > Google存储库

enter image description here

答案 1 :(得分:3)

你添加了google maven repo吗?

repositories {
    // google before jcenter to avoid mailicious artifacts
    maven { url 'https://maven.google.com' } // or simple google() on gradle 4.0+
    jcenter()
    ...
}