google / dagger

A fast dependency injector for Android and Java.
https://dagger.dev
Apache License 2.0
17.45k stars 2.02k forks source link

Mockity.spy Fails upon upgrading dagger to 2.38 #3210

Closed prasadsn closed 2 years ago

prasadsn commented 2 years ago

Here is the error thrown on calling Mocikity.spy() on activity upon upgrading dagger from 2.27 to 2.38 Unable to create mock instance of type 'XXXActivity' org.mockito.exceptions.base.MockitoException: Unable to create mock instance of type 'XXXActivity'

bcorso commented 2 years ago

Hi @prasadsn, Dagger itself doesn't have anything to do with activities so I'm not sure how it's related. Are you using Hilt?

bcorso commented 2 years ago

Closing this. Feel free to reopen if you have more details about how this is related to Dagger.