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

前端 未结 24 1837
灰色年华
灰色年华 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:44

    If you´re building a new app, put the jsonfile in the right place and make sure it's the jsonfile for that app. Before I realized this, when I clicked the jsonfile, I didn't get the information that wanted.

    Go to firebase configurations, download the correct version of google-services.json, and replace the version that didn't work for you. When using the wrong version, you might see the wrong Projectid, storagebucket etc.

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

    Had the same problem i added compile 'com.google.android.gms:play-services-measurement:8.4.0' and deleted apply plugin: 'com.google.gms.google-services' I was using classpath 'com.google.gms:google-services:2.0.0-alpha6' in the build project.

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

    same issue i have.

    i tired all possible solutions that i found. but non were worked.

    always got this error

    Cannot add task ':processDebugGoogleServices' as a task with that name already exists
    

    Now, i solved it.

    1) first i checked my config.xml

    2) and removed unnecessary plugin. (I used firebase fcm plugin for pushnotification, but there was two unnecessary plugin phonegap-plugin-push and cordova-plugin-customurlscheme. I removed both these plugins)

    3) then removed platform.

    4) then add platform

    5) then build it.

    6) now it build successfully.

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

    I had a similar issue/error.. fixed it by moving apply plugin: 'com.google.gms.google-services'
    to the end of app level gradle file.

    And updated the version of gms:play-services and gms:play-services auth

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

    I was finding the same error complaining about mixing google play services version when switching from 8.3 to 8.4. Bizarrely I saw reference to the app-measurement lib which I wasn't using.

    I thought maybe one of my app's dependencies was referencing the older version so I ran ./gradlew app:dependencies to find the offending library (non were).

    But at the top of task output I found a error message saying that the google plugin could not be found and defaulting to google play services 8.3. I used the sample project @TheYann linked to compare. My setup was identical except I applied the apply plugin: 'com.google.gms.google-services' at the top my app's build.gradle file. I moved to bottom of the file and that fixed the gradle compile error.

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

    check gradle.properties and add android.useAndroidX=true or you can also add android.enableJetifier=true or you can comment it by #

    worked for me

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