dimanche 6 décembre 2020

Hilt error while running an android test?

i wrote a simple test class with hilt, i didn't write anything at the test function yet, so it should at least pass it, but instead it gives me that ambiguous error enter image description here

and that is the first line of the error above: enter image description here

my test class

@HiltAndroidTest
class MainTest {

 @get:Rule
 var hiltAndroidRule = HiltAndroidRule(this)

 @Before
 fun init()
 {
     hiltAndroidRule.inject()
 }

 @Test
 fun someTest()
 {}
}

I followed the documentation and created a custom test runner class to use "HiltTestApplication" and replaced it in the build.gradle file and still getting this error. what does this error mean and what should i do ?

Aucun commentaire:

Enregistrer un commentaire