谷歌回购代码但出现错误 - >无法解决:' com.google.android.gms:play-services-appindexing:10.0.0'

时间:2017-02-25 20:46:16

标签: android android-studio build.gradle

/ 上面的部分代码在实际程序中 /

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

    compile 'com.android.support:design:25.2.0'
    compile 'com.github.bumptech.glide:glide:3.6.1'
    compile 'de.hdodenhof:circleimageview:1.3.0'
    compile 'com.android.support:appcompat-v7:25.2.0'

    // Google
    compile 'com.google.android.gms:play-services-auth:10.2.0'

    // Firebase
    compile 'com.google.firebase:firebase-database:10.0.0'
    compile 'com.google.firebase:firebase-auth:10.0 .0'
    compile 'com.google.firebase:firebase-config:10.0.0'
    compile 'com.google.android.gms:play-services-appinvite:10.2.0'
    compile 'com.google.firebase:firebase-messaging:10.0.0'
    compile 'com.google.android.gms:play-services-ads:10.2.0'
    compile 'com.google.firebase:firebase-crash:10.0.0'
    compile 'com.google.firebase:firebase-appindexing:10.0.0'

    // Firebase UI
    compile 'com.firebaseui:firebase-ui-database:0.4.0'

    // Testing dependencies
    androidTestCompile 'junit:junit:4.12'
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
    androidTestCompile 'com.android.support.test:runner:0.5'
    androidTestCompile 'com.android.support:support-annotations:25.2.0'
    compile 'com.google.android.gms:play-services-appindexing:10.0.0'
}

apply plugin: 'com.google.gms.google-services'

1 个答案:

答案 0 :(得分:0)

那么如果你看releases,就没有10.0.0版本。仅10.0.1和推荐的10.2.0。

同时查看setup指南,应用程序索引未列为gps提供的各个软件包之一(虽然我并未明确表示它不存在),所以也许您应该使用核心封装

compile 'com.google.android.gms:play-services:10.2.0'