Class GoogleSignIn not found in auth library

后端 未结 3 1142
无人共我
无人共我 2021-02-20 07:33

I have got problem with signing to Google play by android app, i added: compile \'com.google.firebase:firebase-auth:11.4.2\' and compile \'com.google.android.gms:play-services-a

相关标签:
3条回答
  • 2021-02-20 07:58
    • Update PlayStore lib to latest version 46 from SDK manager->Extra

    • Update all firebase dependencies to 1160

      //Firebase
      compile 'com.google.firebase:firebase-core:11.6.0'
      compile 'com.google.firebase:firebase-auth:11.6.0'
      
    • Update play-services-auth dependencies to 1160

       compile 'com.google.android.gms:play-services-auth:11.6.0'
      
    • Update google-services dependency in project level build.gradle to 3.1.0. Note the maven google dependency:

    buildscript {
         repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.2.3'
            classpath 'com.google.gms:google-services:3.1.0'
         }
       }
    
     allprojects {
        repositories {
            jcenter()
            mavenCentral()
            maven { url "https://maven.google.com"}
    
         }
      }
    
    0 讨论(0)
  • 2021-02-20 07:59

    Here is the release note for version 11.6.0

    In Auth Library :

    Added the GoogleSignInClient and GoogleSignIn classes. GoogleSignInClient provides the entry point for interacting with the Google Sign In API.

    so inject 11.6.0 version of auth artifact.

    compile 'com.google.android.gms:play-services-auth:11.6.0'
    

    compile now deprecated so it's better to use implementation

    implementation 'com.google.android.gms:play-services-auth:11.6.0'
    
    0 讨论(0)
  • 2021-02-20 08:09

    GoogleSignIn / GoogleSignInClient were introduced in Google Play services SDK version 11.6.

    Older versions have slightly different class names and require a GoogleApiClient.

    Please upgrade to 11.6 from Android Studio and configure below dependency.

    dependencies {
         compile 'com.google.android.gms:play-services-auth:11.6.0'
     }
    
    0 讨论(0)
提交回复
热议问题