android - 无法解析 : `com.google.android.gms:play-services-appindexing:10.0.0`

标签 android android-app-indexing

在设置 compile 'com.google.android.gms:play-services-appindexing:10.0.0' 时出现以下错误:

Error:(82, 13) Failed to resolve: com.google.android.gms:play-services-appindexing:10.0.0

在设置 compile 'com.google.android.gms:play-services-appindexing:9.8.0' 时出现以下错误:

Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 10.0.0.

如果有人能告诉我这有什么问题,我将不胜感激,因为 rest play services 版本 10.0.0 工作正常。

我的 build.gradle 文件

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.22.0'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

android {
    signingConfigs {

    }
    compileSdkVersion 25
    buildToolsVersion '25.0.0'

    defaultConfig {
        applicationId "com.example.app"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 41
        versionName "2.2.0"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.config
        }
        debug {
            signingConfig signingConfigs.config
        }
    }
    lintOptions {
        checkReleaseBuilds false
    }
}

configurations {
    compile.exclude group: 'stax'
    compile.exclude group: 'xpp3'
}

repositories {
    maven {
        url "http://dl.bintray.com/microsoftazuremobile/SDK"
    }
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    //Microsoft azure
    compile 'com.microsoft.azure:azure-notifications-handler:1.0.1@aar'
    compile files('libs/notification-hubs-0.4.jar')

    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:25.0.1'
    compile 'com.android.support:support-v4:25.0.1'
    compile 'com.android.support:recyclerview-v7:25.0.1'
    compile 'com.android.support:cardview-v7:25.0.1'
    compile 'com.android.support:design:25.0.1'
    compile 'com.android.support:palette-v7:25.0.1'

    compile 'com.google.android.gms:play-services-auth:10.0.0'
    compile 'com.google.android.gms:play-services-maps:10.0.0'
    compile 'com.google.android.gms:play-services-analytics:10.0.0'
    compile 'com.google.android.gms:play-services-gcm:10.0.0'
    compile 'com.google.android.gms:play-services-appindexing:10.0.0'
    compile 'com.google.android.gms:play-services-base:10.0.0'

    compile 'com.google.code.gson:gson:2.6.2'
    compile 'com.android.support:multidex:1.0.1'

    //Facebook SDK
    compile 'com.facebook.android:facebook-android-sdk:4.17.0'

}

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

最佳答案

您正在寻找的 appindexing 库现在位于新的 gradle 目标下。

您想将 compile 'com.google.firebase:firebase-appindexing:10.0.0' 添加到应用的 build.gradle 文件中:)

您可以看到最新的 libraries here.

关于android - 无法解析 : `com.google.android.gms:play-services-appindexing:10.0.0` ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40732418/

相关文章:

android - 比较 Android sqlite 数据库中的日期(存储为字符串)

android - 应用程序图标未出现在谷歌搜索自动完成中

android - Android 中的应用索引

android - Google App Indexing for Android 的 setId 和 getUrl 方法之间的区别?

ios - Google App Indexing - 如何测试它?

Android 应用索引自动完成

android - 通过命令行发布到 Google Play

android - 如何清除 Android 堆栈中的所有现有 Activity

java - Android FileOutputStream 似乎失败

android - 如何更好地处理GPS定位和android