无法将PowerMock与Eclipse一起使用

无法将PowerMock与Eclipse一起使用,eclipse,junit,powermock,Eclipse,Junit,Powermock,使用“mvn test”命令,我的所有测试都运行良好。然而,当我使用EclipseIDE来运行测试时,它不再工作。我得到了这个异常错误: org.powermock.reflect.exceptions.FieldNotFoundException: No instance field named "reporter" could be found in the class hierarchy of org.mockito.internal.MockitoCore. at org.pow

使用“mvn test”命令,我的所有测试都运行良好。然而,当我使用EclipseIDE来运行测试时,它不再工作。我得到了这个异常错误:

org.powermock.reflect.exceptions.FieldNotFoundException: No instance field named "reporter" could be found in the class hierarchy of org.mockito.internal.MockitoCore.
    at org.powermock.reflect.internal.matcherstrategies.FieldNameMatcherStrategy.notFound(FieldNameMatcherStrategy.java:40)
    at org.powermock.reflect.internal.WhiteboxImpl.findSingleFieldUsingStrategy(WhiteboxImpl.java:501)
    at org.powermock.reflect.internal.WhiteboxImpl.findFieldInHierarchy(WhiteboxImpl.java:454)
    at org.powermock.reflect.internal.WhiteboxImpl.findFieldInHierarchy(WhiteboxImpl.java:442)
我已经读了一些关于这个的话题。这似乎是由于某些junit/powermock版本的兼容性:

但我认为我的说法是正确的:

<junit.version>4.12</junit.version>
<powermock.version>1.7.3</powermock.version>
4.12
1.7.3

A liitle late-hough。请在此处找到答案:A liitle late-hough。请在此处找到答案: