Required lifecycle owner found Activity
After implementing LifeCycleOwner
in Main Activity, error goes and work properly
Updated
Use latest androidx lib and u don't need to implement LifecycleOwner. Now it is implemented by default in ComponentActivity which AppcompatActivity implements
Same problem here, so I had to update my androidx.appcompat dependency, like below:
implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'
no need to implement LifecycleOwner
(as its implemented by default now {as mentioned by Darthcow})