I am trying to write a sample app using Android architecture components and but even after trying for days I could not get it to work. It gives me the above exception.
There are few reason to throw the exception . I have mention some of them..
Make sure your view model class constructor is public
Make sure you have added the dependency in your gridle file for lifecycle also if you use room and other libries you have added ..