无法在scala intelliJ中运行单元测试

时间:2017-11-21 21:02:56

标签: scala

我试图运行scala单元测试,但我遇到了这个问题。

java.lang.NoSuchMethodError: scala.Product.$init$(Lscala/Product;)V

at org.scalatest.time.Units.<init>(Units.scala:33)
at org.scalatest.time.Days$.<init>(Units.scala:293)
at org.scalatest.time.Days$.<clinit>(Units.scala)
at org.scalatest.time.Span$.<init>(Span.scala:584)
at org.scalatest.time.Span$.<clinit>(Span.scala)
at org.scalatest.Suite$.<init>(Suite.scala:1399)
at org.scalatest.Suite$.<clinit>(Suite.scala)
at org.scalatest.junit.JUnitRunner.<init>(JUnitRunner.scala:61)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at 

代码编译得很好。只是测试没有运行。我已经设置了全局sdk和库。请帮忙。

0 个答案:

没有答案