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

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

    In my case when i was using firebase services the google.json file was mismatched check once that also

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

    I also faced the same issue. But I forgot to add google-services.json in my project. You can get this file from Google.

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

    Also please check your package name in Manifest and package name in google services json file. If both have package name differ from one another u will have this issue.

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

    I fixed it without deleting apply plugin: 'com.google.gms.google-services' I had the error Execution failed for task ':app:processDebugGoogleServices' because I was using two different versions of google services in my dependencies :

    implementation "com.google.android.gms:play-services-maps:11.8.0"
    implementation "com.google.android.gms:play-services-nearby:16.0.0"
    

    I changed it to :

    implementation "com.google.android.gms:play-services-maps:11.8.0"
    implementation "com.google.android.gms:play-services-nearby:11.8.0"
    

    Then it worked

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

    Ensure that you have done these two things under defaultConfig in Android/app/build.gradle after wiring up Firebase for your Flutter app.

    1) Whatever package name you entered while creating your Firebase android project, exactly the same should be updated as your applicationId under defaultConfig.

    2) Add the line multiDexEnabled true under defaultConfig.

    So defaultConfig{} should now look something like this

    defaultConfig {
        applicationId "com.companyName.appName"
        minSdkVersion 16
        targetSdkVersion 27
        multiDexEnabled true
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    
    0 讨论(0)
  • 2020-11-30 01:38

    NEVER DELETE apply plugin: 'com.google.gms.google-services' from the gradle. Sometimes you are using com.google.gms:google-services:3.1.0 , without apply plugin: 'com.google.gms.google-services' your gradle build successfully. BUT IT IS COMPLETELY WRONG !!!! This error comes due to google-service.json file is not at the correct location. Go to your PROJECT TAB at left side above. If you display it as ANDROID make it PROJECT then check your google-service.json file is at this location. EXPAND app then see google-service.json file below the build.gradle. IF NOT PLACE IT THERE BY RIGHT CLICK ON THE app .

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