Hello everyone I am writing DAO test and I am stuck at this line:
database = Room.inMemoryDatabaseBuilder(
getContext(),
SomeDatabase::class.java).build()
I am getting this error:
java.lang.NoClassDefFoundError: androidx/test/InstrumentationRegistry Caused by: java.lang.ClassNotFoundException: androidx.test.InstrumentationRegistry
I have added to my build.gradle :
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
but still no luck. Have anyone experienced similar issues? Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire