Failed to resolve com.google.gms: google-services: 3.0.0

I read a lot of posts on this topic, but no one helped me. I use Android Studio and follow this guide

This is the Gradle project:

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

allprojects {
    repositories {
        jcenter()
    }
}

this is gradle app:

apply plugin: 'com.android.application'

    android {
        compileSdkVersion 25
        buildToolsVersion "25.0.1"
        defaultConfig {
            applicationId "com.xyv.appname"
            minSdkVersion 15
            targetSdkVersion 25
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }

    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.0.1'
        compile 'com.android.support:design:25.0.1'
        testCompile 'junit:junit:4.12'
        compile 'com.google.firebase:firebase-core:10.0.1'        
    }
    apply plugin: 'com.google.gms.google-services'

Here you can see where I added google-services.json to my application:

enter image description here

These are my SDK tools:

enter image description here

Does anyone understand what my mistake is?

thanks in advance

+5
source share
3 answers

You may need to add

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

in your build.gradle application. ref: Update to Google Play services: 9.0.0 Error Unable to resolve: com.google.android.gms: play-services-measurement: 9.0.0

3.0.0, , Android SDK.

0

SDK Manager, "" " Google Play", .

enter image description here

0

, Android 2.3 beta 2. Android, .

0

Source: https://habr.com/ru/post/1663638/


All Articles