I'm getting an error when I'm trying to add the classpath to google play services in my root build.gradle file. I'm trying to follow a firebase tutorial and it states to put classpath 'com.google.gms:play-services:11.0.4'into the root gradle file
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:play-services:11.0.4'
// NOTE: Do not place your application dependencies here; they
belong
// in the individual module build.gradle files
}
}
However, I'm getting the following error:
Error:Could not find com.google.gms:play-services:11.0.4.
Searched in the following locations:
file:/home/graffixnyc/android-studio/gradle/m2repository/com/google/gms/play-services/11.0.4/play-services-11.0.4.pom
file:/home/graffixnyc/android-studio/gradle/m2repository/com/google/gms/play-services/11.0.4/play-services-11.0.4.jar
https://jcenter.bintray.com/com/google/gms/play-services/11.0.4/play-services-11.0.4.pom
https://jcenter.bintray.com/com/google/gms/play-services/11.0.4/play-services-11.0.4.jar
Required by:
project :
Now what I noticed is it's looking in /home/graffixnyc/android-studio/gradle/m2repository/com/google/gms/play-services/11.0.4/play-services-11.0.4.pom
However, mine is located: /home/graffixnyc/android-sdk/extras/google/m2repository/com/google/android/gms/play-services/11.0.4
My SDK has always been in this location so I'm not sure why it's looking in /home/graffixnyc/android-studio/gradle/m2repository/com/google/gms/play-services/11.0.4
How do I get Android Studio to recognize it in the correct location?