java.lang.VerifyError : class com. intellij.junit4.JUnit4TestRunnerUtil$5 覆盖 final方法 getRunner.()Lorg/junit/runner/Runner;

标签 java intellij-idea junit intellij-plugin

从 IntelliJ 运行测试用例时 - 面临这个问题。不过,mvn clean install 工作正常。

以前有人遇到过这个问题吗?

最佳答案

尝试在您的 Maven 项目中使用 JUnit 4 依赖项。 https://mvnrepository.com/artifact/junit/junit/4.12

<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.12</version>
    <scope>test</scope>
</dependency>

关于java.lang.VerifyError : class com. intellij.junit4.JUnit4TestRunnerUtil$5 覆盖 final方法 getRunner.()Lorg/junit/runner/Runner;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53512970/

相关文章:

IDEA IDE 的 Emacs 快捷方式?

java - Arquillian 可以并行运行测试吗?

java - 无法使用 hibernate 通过 uniqueConstraintException 的 junit 测试

java - 在 swing 中使用 boolean 变量而不是 ActionListner 接口(interface)

java - 如何保证一个线程在另一个CORE中执行?

java - Spring 配置

java - 使用 Gradle 配置 IntelliJ 代码样式

java - 如何将一个 bean 的构造函数参数传递给嵌套 bean

git - 使用 no-ff merge IntelliJ 任务

java - 避免运行生成超长命令行的 java 测试时出现错误?