getLifecycle() returned null in ComponentActivity's constructor. Please make sure you are lazily constructing your Lifecycle
please tell me the solutiom for this error
getLifecycle() returned null in ComponentActivity's constructor. Please make sure you are lazily constructing your Lifecycle
please tell me the solutiom for this error
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'