Attempt to mockito mock any class generates ExceptionInInitializerError

前端 未结 7 1514
無奈伤痛
無奈伤痛 2020-12-16 09:26

When I run the following code:

public class ActivityTest extends ActivityInstrumentationTestCase2 {
    ....
    public void testCanCreat         


        
7条回答
  •  猫巷女王i
    2020-12-16 09:59

    I encountered the same error with EasyMock and eventually traced it to an absence of dexmaker. I solved it with the following dependency:

    androidTestCompile "com.google.dexmaker:dexmaker:1.2"
    

    That might work for mockito as well

提交回复
热议问题