Failed To Resolve: Com.google.gms.google-services:15.0.1:
Solution 1:
Remove com.google.gms.google-services:15.0.1
from dependencies, that is a gradle file plugin not an dependency.
defmySupportVersion = "26.1.0"
dependencies {
compile"com.android.support:appcompat-v7:$mySupportVersion"compile"com.android.support:design:$mySupportVersion"compile"com.android.support:cardview-v7:$mySupportVersion"compile'com.android.support.constraint:constraint-layout:1.0.2'compile'com.firebase:geofire-android:2.1.1'compile"com.google.android.gms:play-services-maps:15.0.1"compile"com.google.android.gms:play-services-drive:15.0.1"compile'com.github.bumptech.glide:glide:4.0.0'compile'com.github.jd-alexander:library:1.1.0'compile'com.paypal.sdk:paypal-android-sdk:2.15.3'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
You should use def
for flexibility when changing version.
Solution 2:
I think unchecking Offline work
option may solve the problem. Check My Answer Here.
Solution 3:
A lot of problems can cause this issue:
1) Check if you have Maven/Google repository on your top level main build.grade (can be found on your project root folder):
allprojects {
repositories {
jcenter()
google()
}
}
2) Check if you have the correct library number on your module App build.grade (can be found on \app) :
https://developer.android.com/topic/libraries/support-library/packages
3) Check buildToolsVersion and targetSdkVersion on your module App build.grade (can be found on \app):
Sometimes it's not possible to download anything if buildToolsVersion is not set to the new version. Check this site: https://developer.android.com/studio/releases/build-tools
4) Check internet connection and firewall issues
This is so simple, but nobody checks...
5) Check if Android Studio is set to Offline Work:
File ->
Other Settings ->Default Settings ->
Build, Execution, Deployment ->
Build Tools ->
Gradle -> Uncheck Offline Work
6) If nothing works, click on Android Studio "clean project" and then "invalidade cache/restart":
Build->Clean Project
File->Invalidade Cache/Restart
Good Luck!
Solution 4:
just change the play service version to 15.0.0 and sync the gradle
Post a Comment for "Failed To Resolve: Com.google.gms.google-services:15.0.1:"