Android studio 谷歌服务;gms:googleservices:2.1.2;无法解析服务度量

Android studio 谷歌服务;gms:googleservices:2.1.2;无法解析服务度量,android-studio,gradle,google-play-services,Android Studio,Gradle,Google Play Services,正在尝试更新到最新的google play services 9.4.0。如果我将类路径保留在应用程序级别渐变为2.1.2,这似乎是截至2003年6月的最新版本,我会发现无法解决的错误: 错误:未能解析:com.google.android.gms:play services度量值:9.4.0 安装存储库和同步项目 我已经在SDK管理器中更新了我的包。 如果我将类路径保留为3.0.0,这是发布的版本,那么一切似乎都没问题。你知道为什么我在2.1.2版本的类路径中会出现这样的错误吗?下面是我的gr

正在尝试更新到最新的google play services 9.4.0。如果我将类路径保留在应用程序级别渐变为2.1.2,这似乎是截至2003年6月的最新版本,我会发现无法解决的错误:

错误:未能解析:com.google.android.gms:play services度量值:9.4.0 安装存储库和同步项目

我已经在SDK管理器中更新了我的包。 如果我将类路径保留为3.0.0,这是发布的版本,那么一切似乎都没问题。你知道为什么我在2.1.2版本的类路径中会出现这样的错误吗?下面是我的gradle文件。Android Studio版本:2.1.3。谢谢你的帮助

build.gradle项目级别:

buildscript {
    repositories {
        jcenter()
        mavenLocal()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.3'
        classpath 'com.google.gms:google-services:2.1.2'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        mavenLocal()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
build.gradle应用程序级别:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.0"

    defaultConfig {
        applicationId "com.example.main.projectone"
        minSdkVersion 18
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

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


    compile('com.facebook.android:facebook-android-sdk:4.7.0') {
        exclude module: 'bolts-android'
    }

    compile 'com.android.support:appcompat-v7:24.0.0'

    compile 'com.android.support:design:24.0.0'
    compile 'com.parse:parse-android:1.13.0'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'
    compile 'com.squareup.okhttp3:okhttp:3.3.1'
    compile 'com.android.support:cardview-v7:24.0.0'
    compile 'com.android.support:support-v4:24.0.0'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.1'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.android.support:recyclerview-v7:24.0.0'
    compile 'com.firebase:geofire-android:2.0.0'

    compile 'com.google.android.gms:play-services:9.4.0'
    compile 'com.google.firebase:firebase-auth:9.4.0'
    compile 'com.google.firebase:firebase-storage:9.4.0'
}

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

由于您使用的是9.4.0版,因此必须使用google play service插件V3.0.0:

buildscript {
    // ...
    dependencies {
        // ...
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

检查设置。

谢谢您的回复Gabriele,我同意;firebase文档提到了google服务:3.0.0。我想知道为什么6月3日发布的2.1.2版不起作用,我认为这是最新的版本。无论哪种方式,至少现在我会继续使用3.0.0。