I am integrating OAuth login for Google+ on my android application, following the tutorial.
According to the tutorial, I should add the Google Service plugin by addi
Google updated their guide. Where it was classpath 'com.google.gms:google-services:1.0' now reads classpath 'com.google.gms:google-services:1.3.0-beta1' like joluet suggested.
I would advise you against doing what you are doing. I did it too (by following Set up a GCM Client App on Android blindly) but ended up with exceeding 65K method limit.
So, you should remove the following lines from your gradle:
apply plugin: 'com.google.gms.google-services'
classpath 'com.google.gms:google-services:1.0'
Now import APIs of Google Plus with simple gradle import:
compile 'com.google.android.gms:play-services-plus:8.1.0'
Inside the .idea folder
exists a workspace.xml file that defines the project's structure
. I suggest you to close Android Studio, then delete .idea folder
and then import the project again. The .idea would be generated by the IDE again. For me this solution works.
I ran into the same issue today. In the samples they use this line instead:
classpath 'com.google.gms:google-services:1.3.0-beta1'
This works.
As of 25th Nov,2015, google released a newer version.
Try adding:
classpath 'com.google.gms:google-services:2.0.0-alpha1'
And don't forget to add jcenter()
repository under buildscript.
Thanks.
Adding jcenter repository to project level build.gradle helped in my case:
buildscript {
repositories {
jcenter();
mavenCentral()
}