Google Auth migrating to androidx: SignInHubActivity does not implement Lifecycle

I fixed this issue by using the latest version of the appcompat library:

implementation "androidx.appcompat:appcompat:1.1.0-rc01"

In previous versions the class AppCompatActivity did not implement the LifecycleOwner interface thus leading to the errors you observed.


the same issue! I've just added the "core" dependency and bumped "appcompat" to the latest alpha version and it helped.

dependencies {

implementation "androidx.core:core:1.1.0-alpha03"
implementation "androidx.legacy:legacy-support-v4:1.0.0"
implementation "androidx.annotation:annotation:1.0.1"
implementation "androidx.recyclerview:recyclerview:1.1.0-alpha01"
implementation "androidx.appcompat:appcompat:1.1.0-alpha01"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "androidx.cardview:cardview:1.0.0"
implementation "com.google.android.material:material:1.1.0-alpha02"

implementation "com.google.firebase:firebase-core:16.0.6"
implementation "com.google.firebase:firebase-auth:16.1.0"
implementation "com.google.firebase:firebase-storage:16.0.5"
implementation "com.google.firebase:firebase-perf:16.2.3"
implementation 'com.firebaseui:firebase-ui-database:4.3.0'

implementation "com.google.android.gms:play-services-auth:16.0.1"
implementation "com.google.android.gms:play-services-location:16.0.0"
implementation "com.google.android.gms:play-services-maps:16.0.0"
...
}

I use:

compileSdkVersion 28
buildToolsVersion "28.0.3"

Top gradle.build:

dependencies {
    classpath 'com.android.tools.build:gradle:3.3.0'
    classpath 'com.google.gms:google-services:4.2.0'
    ...
}

gradle.properties:

android.debug.obsoleteApi=true
android.enableR8 = true
android.useAndroidX=true
android.enableJetifier=true

gradle wrapper's gradle version is set to gradle-4.10.1-all.zip. Also I tried to Invalidate/restart my AS 3.3. Hope it will help somebody.