找不到org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner

时间:2019-05-07 16:08:44

标签: java mockito powermock

尝试每Power Mockito showing error for org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner cannot be resolved添加部门,但没有运气。

build.gradle读取:

....
testCompile "junit:junit:4.12"
testCompile 'org.powermock:powermock-api-mockito:1.6.5'
testCompile 'javax:javax-persistence:2.1.0.v201304241213'
testCompile 'org.apache.commons:commons-lang3:3.4'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'org.powermock:powermock-module-junit4:1.6.5'
testCompile 'org.powermock:powermock-module-junit4-common:1.6.5'
testCompile group: 'javax.ws.rs', name: 'jsr311-api', version: '1.1.1'
testCompile group: 'javax', name: 'javaee-api', version:'7.0'
....

我用@ RunWith(PowerMockRunner.class)在本地运行测试,但出现此错误:

Error:(26, 25) java: cannot access org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner class file for org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner not found

其他人以前见过吗?

0 个答案:

没有答案