Error:(23, 13) Failed to resolve: com.google.android.gms:play-services:11.2.0 "Install Repository and sync project" dose not work

I am trying to get location and update to server in my Android app. This is my Gradle code, here I included compile 'com.google.android.gms:play-services:11.2.0'. This line is from the documentation:

dependencies {
    compile 'com.google.android.gms:play-services:11.2.0'

    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:support-v4:25.3.1'       
}

But this is the error I get:

Error:(23, 13) Failed to resolve: com.google.android.gms:play-services:11.2.0
Install Repository and sync project
Show in File
Show in Project Structure dialog

Clicking in "Install Repository and sync project" doesn't work.

Add this to your project-level build.gradle file:

repositories {
    maven {
        url "https://maven.google.com"
    }
}

Release Notes | Google APIs for Android, Add this to your project-level build.gradle file: repositories { maven { url "https://​maven.google.com" } }. Stack Overflow Public questions and Error:(23, 13) Failed to resolve: com.google.android.gms:play-services:11.2.0 “Install Repository and sync project” dose

Try update version new of google play service

  1. Start Android Studio.
  2. On the Tools menu, click Android > SDK Manager.
  3. Update the Android Studio SDK Manager: click SDK Tools, expand Support
  4. Repository, select Google Repository, and then click OK.

Could not find com.google.android.gms:play-services-gcm · Issue , But following error come up: JS server already running. Could not find com.​google.android.gms:play-services-gcm #13 in inconsistent location '/usr/local/​opt/android-sdk/samples/android-23' https://stackoverflow.com/questions/​45696551/failed-to-resolve-com-google-firebasefirebase-core11-2-0. Questions: While setting compile 'com.google.android.gms:play-services-appindexing:10.0.0' it is giving following error: Error:(82, 13) Failed to resolve: com.google.android.gms:play-services-appindexing:10.0.0 and while setting compile 'com.google.android.gms:play-services-appindexing:9.8.0' it is giving following error: Error:Execution failed for task ':app:processDebugGoogleServices

In build.gradle file:

repositories {
    maven {
        url "https://maven.google.com"
    }
}

Same problem and more solution here

Error:(39, 13) Failed to resolve: com.android.support:appcompat-v7:26.0.0

com.google.gms:google-services Compatibility Issue, After updating to the semantinc versioning the OneSignal Gradle plugin fails. @sannyo We set disableVersionCheck flag to true to resolve this build error in the PR above. The library com.google.android.gms:play-services-base is being requested by various other powerful23 mentioned this issue on Apr 16, 2019. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Learn more Error:(24, 13) Failed to resolve: com.android.support:appcompat-v7:20

Error:(22, 13) Failed To Resolve: com.google.android.gms:play , Error:(22, 13) Failed To Resolve: com.google.android.gms:play-services:11.2.0 - android-studio. +' compile 'com.google.android.gms:play-services-maps:11.0.4' testCompile Error:Failed to resolve: android.arch.core:common:1.1.0. My system Error:(23, 17) Failed to resolve: junit:junit:4.12 The screenshot of my build Error:Failed to resolve: com.google.android.gms:play-services-measurement:9.4.0 Install Repository and sync project I have already my packages updated in SDK manager. If I leave the classpath as 3.0.0 which was the release of May things seem to be ok.

Firebase Android Release Notes, AdMob, com.google.android.gms:play-services-ads:19.1.0 Update - April 23, 2020 Resolved an issue that prevented Firebase Dynamic Links to log app_open . Updated Android Gradle Plugin API usage to fix APK locating bug that Fixed NoSuchMethodError:IncompatibleIidVersionDetector lint check that failed for 

Fix Android Studio, How to fixing android studio error when trying to update build.gradle (google play service for Duration: 2:39 Posted: Dec 9, 2017

Comments
  • Possible duplicate of Failed to resolve: com.google.firebase:firebase-core:11.2.0
  • As per Google Play services release notes, dependencies are now available from maven.google.com