0

I have been trying to write test case for my Activity. But, android lint showing warnings while accessing public variable/method in Activity from Kotlin Test Class.

Here is the lint warning:

Cannot access 'androidx.core.app.OnMultiWindowModeChangedProvider' which is a supertype of 'com.app.sample.MyActivity'. Check your module classpath for missing or conflicting dependencies

Cannot access 'androidx.core.app.OnNewIntentProvider' which is a supertype of 'com.app.sample.MyActivity'. Check your module classpath for missing or conflicting dependencies

Cannot access 'androidx.core.app.OnPictureInPictureModeChangedProvider' which is a supertype of 'com.app.sample.MyActivity'. Check your module classpath for missing or conflicting dependencies

Cannot access 'androidx.core.content.OnConfigurationChangedProvider' which is a supertype of 'com.app.sample.MyActivity'. Check your module classpath for missing or conflicting dependencies

Cannot access 'androidx.core.content.OnTrimMemoryProvider' which is a supertype of 'com.app.sample.MyActivity'. Check your module classpath for missing or conflicting dependencies

Cannot access 'androidx.core.view.MenuHost' which is a supertype of 'com.app.sample.MyActivity'. Check your module classpath for missing or conflicting dependencies

These lint warnings disappear when I access same variable/method from a Java test class.

I have tried:

  • Cleaning and rebuilding the project.
  • Invalidated cache and restarted the project.
Suneesh Ambatt
  • 1,347
  • 1
  • 11
  • 41

0 Answers0