因为这个错误我要疯了。
但是,我的代码可以生成java.lang.ExceptionInitializerError.。
这是我的密码
@SuppressWarnings("static-access")
@SE(api = "package... .isMethod()", type = TYPE.AUTO)
@Before
@Test
public void testIsMethod_P01() throws Exception
{
A a = Mockito.mock(A.class);
Mockito.doReturn(true).when(a).isMethod();
assertEquals(true, a.isMethod());
}我正在使用Eclipse,这表明问题行是
A a = Mockito.mock(A.class);我想这个异常是在创建模拟对象时发生的。
我试过很多方法来解决这个问题..。
System.setProperty("dexmaker.dexcache", getContext().getCacheDir().getPath()),
many annotations(Before, Test, RunWith etc...),
libs(about dex)甚至maven用于依赖项
但是,我不知道到底是什么问题。请告诉我原因并分享解决方案..。
发布于 2016-07-20 09:42:14
放下你的
@Before上述方法的注释。
https://stackoverflow.com/questions/38475676
复制相似问题