Mockito AbstractMethodError on initMocks

前端 未结 5 1399
长发绾君心
长发绾君心 2020-12-17 17:16

So I\'ve been struggling pretty much all day trying to get Mockito to work for my Android project. I added everything to my Gradle build file:

androidTestCom         


        
5条回答
  •  春和景丽
    2020-12-17 18:14

    Mockito.initAnnotations and @RunWith are incompatible to each other. They both initialize the annotations. Try to remove one of the two. I suggested to keep the runner.

提交回复
热议问题