Here are my environment:
- Android Studio 2.3.3
- Android SDK Build-Tools 26.0.1
- Google Play Service 43
- Android Support Repository, rev 47
- Android SDK Platform 26
1. Start from Google Play services 11.2 release, Google Play services dependcies are now abailable via maven.google.com. We need to change our application Grandle build scripts.
- Open Tab 1:Project, select Android
- Expand Grandle Scripts
- Open build.grandle (Project: [your project name])
- Find and add google() inside allprojects like this:
allprojects {  repositories {    jcenter()    maven {      url 'https://dl.google.com/dl/android/maven2/'      // url 'https://maven.google.com' // NOT WORK      // Alternative URL is 'https://dl.google.com/dl/android/maven2/'    }  }}
2. Google Play services 11.2 release requires Android SDK Platform 26. You need to install it from SDK Manager and used it.
Open Tab 1:Project, select Android
- Expand Grandle Scripts
- Open build.grandle (Module: app)
- Make sure you use Android SDK Platform 26
android {  compileSdkVersion 26  buildToolsVersion "26.0.1"  defaultConfig {    ...    targetSdkVersion 26    ...    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }    }}
3. You can change and use Google Service 11.2 for example to use Google Adsmob
Open Tab 1:Project, select Android
- Expand Grandle Scripts
- Open build.grandle (Module: app)
dependencies {  ...  compile 'com.google.android.gms:play-services-ads:11.2.2'  ...}References:
- https://stackoverflow.com/questions/45692460/failed-to-resolve-com-google-android-gmsplay-services-in-intellij-idea-with-gr
- https://developers.google.com/android/guides/releases
- https://developer.android.com/studio/build/dependencies.html
