Firebaseui-android: Class 'com.firebase.ui.auth.KickoffActivity' does not implement interface 'androidx.lifecycle.LifecycleOwner'

Created on 29 Nov 2018  路  8Comments  路  Source: firebase/FirebaseUI-Android

Step 1: Are you in the right place?

Yes

Step 2: Describe your environment

  • Android device: Nexus 5X API 27
  • Android OS version: API 27
  • Google Play Services version: 16.0.0
  • Firebase/Play Services SDK version: 16.0.5
  • FirebaseUI version: 4.2.1

Step 3: Describe the problem:

After migrating to AndroidX Auth UI not working anymore

Observed Results:

java.lang.IncompatibleClassChangeError: Class 'com.firebase.ui.auth.KickoffActivity' does not implement interface 'androidx.lifecycle.LifecycleOwner' in call to 'androidx.lifecycle.Lifecycle androidx.lifecycle.LifecycleOwner.getLifecycle()' (declaration of 'androidx.lifecycle.LiveData' appears in /data/app/

Expected Results:

Showing Auth UI interface

Relevant Code:

```
List providers = Arrays.asList(
new AuthUI.IdpConfig.EmailBuilder().build(),
new AuthUI.IdpConfig.GoogleBuilder().build(),
new AuthUI.IdpConfig.FacebookBuilder().build());

// Create and launch sign-in intent
startActivityForResult(
AuthUI.getInstance()
.createSignInIntentBuilder()
.setAvailableProviders(providers)
.build(),
RC_SIGN_IN);
```

Most helpful comment

I had somewhat similar issue and commenting out/removing implementation 'androidx.core:core:1.1.0-alpha02' solved it for me.

All 8 comments

This looks to be the same as in #1274 , can you see if any of my suggestions there help you?

Yes I followed all of this before, It's still not working. I'm using this version of lifecycle:
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'

I had somewhat similar issue and commenting out/removing implementation 'androidx.core:core:1.1.0-alpha02' solved it for me.

@ashwanibhatt Thanks a lot, You can't imagine how much this comment helped me.

Thanks @ashwanibhatt !!

I had somewhat similar issue and commenting out/removing implementation 'androidx.core:core:1.1.0-alpha02' solved it for me.

This Worked !!! Thanks so so much buddy

@ashwanibhatt902 But I need this lib androidx.core: core for my project.
I fixed it.
https://stackoverflow.com/questions/53899751/google-auth-migrating-to-androidx-signinhubactivity-does-not-implement-lifecycl

Many thanks to @bullest. Next line fixed it for me:
implementation "androidx.appcompat:appcompat:1.1.0-beta01"

Was this page helpful?
0 / 5 - 0 ratings