I am following this link to integrate Google sign-in in my android app.https://developers.google.com/identity/sign-in/android/start-integrating As given in last step on the
if you got an error
Execution failed for task ‘:app:fabricGenerateResourcesDebug’. Crashlytics Developer Tools error.
remove also this line:
apply plugin: 'io.fabric'
I had the same issue and resolved it by adding the following line in the dependencies of the project-level build.gradle:
classpath 'com.google.gms:google-services:3.0.0'
For a full working example, check out the following project on github.
Hope this helps :)
Important note: You should only apply plugin at bottom of build.gradle (App level)
apply plugin: 'com.google.gms.google-services'
I mistakenly apply this plugin at top of the build.gradle. So I get error.
One more tips : You no need to remove even you use the 3.1.0 or above. Because google not officially announced
classpath 'com.google.gms:google-services:3.1.0'
None of the answers here helped. I needed to have "apply plugin: 'com.google.gms.google-services'" in my gradle. What helped was updating Android Studio to the latest version. I was then able to add the plugin and connect to Firebase Messaging Service.
I just had to delete and reinstall my google-services.json
and then restart Android Studio.
In my case i have multiple product flavors. It used to work earlier. It stopped working after updating project gradle version to 4.0.1 and 'google-services:4.3.4'.
I got error like 'Task :app:processDebugGoogleServices FAILED' when i run the project.
I replaced 'google-services.json' in app module with 'my-product-flavor/google-services.json'. It is working fine now.