idea com.intellij.junit4.JUnit4TestRunnerUtil$5 overrides final method getRunner.()Lorg/junit/runner
Posted 请叫我大师兄_
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了idea com.intellij.junit4.JUnit4TestRunnerUtil$5 overrides final method getRunner.()Lorg/junit/runner相关的知识,希望对你有一定的参考价值。
idea 报错:com.intellij.junit4.JUnit4TestRunnerUtil$5 overrides final method getRunner.()Lorg/junit/runner/Runner;
问题的原因是:intellij idea的junit和org的junit不兼容。
解决方案:换junit版本,在pom.xml中明确引入下面的依赖
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
以上是关于idea com.intellij.junit4.JUnit4TestRunnerUtil$5 overrides final method getRunner.()Lorg/junit/runner的主要内容,如果未能解决你的问题,请参考以下文章
idea com.intellij.junit4.JUnit4TestRunnerUtil$5 overrides final method getRunner.()Lorg/junit/runner
Apache Maven IDEA Plugin Usage(mvn idea:idea/mvn idea:clean/mvn idea:project)