ilham fidatama
ilham fidatama

Reputation: 207

adding a new phone & tablet module

I have problem after adding a new phone & tablet module in my project.
I get an error massage like this:

Cannot access 'androidx.lifecycle.HasDefaultViewModelProviderFactory' which is a supertype of 'com.example.favoriteuser.MainActivity'. Check your module classspath for missing or conflicting dependecies.

enter image description here

Upvotes: 2

Views: 271

Answers (1)

Dmitry Kopytov
Dmitry Kopytov

Reputation: 361

Add the following dependencies to module-level build.gradle file

implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0'
implementation "androidx.lifecycle:lifecycle-viewmodel:2.2.0"

Upvotes: 1

Related Questions