0

getLifecycle() returned null in ComponentActivity's constructor. Please make sure you are lazily constructing your Lifecycle

please tell me the solutiom for this error

vignesh
  • 31
  • 2

1 Answers1

0

The LifecycleOwner interface is now implemented by ComponentActivity which is extended by FragmentActivity -> AppCompatActivity. You should now be able to get the lifecycle object from your activities.

if you want to use that then you can use bellow configuration

implementation 'androidx.appcompat:appcompat:1.0.1'
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
//Metrisl Design
implementation 'com.google.android.material:material:1.0.0'
Jyotish Biswas
  • 674
  • 5
  • 11