Gradle Error:Execution failed for task ':app:processDebugGoogleServices'

前端 未结 24 1834
灰色年华
灰色年华 2020-11-30 01:09

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

相关标签:
24条回答
  • 2020-11-30 01:20

    if you got an error

    Execution failed for task ‘:app:fabricGenerateResourcesDebug’. Crashlytics Developer Tools error.

    remove also this line:

    apply plugin: 'io.fabric'
    
    0 讨论(0)
  • 2020-11-30 01:22

    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 :)

    0 讨论(0)
  • 2020-11-30 01:22

    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' 
    
    0 讨论(0)
  • 2020-11-30 01:25

    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.

    0 讨论(0)
  • 2020-11-30 01:26

    I just had to delete and reinstall my google-services.json and then restart Android Studio.

    0 讨论(0)
  • 2020-11-30 01:27

    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.

    0 讨论(0)
提交回复
热议问题