java.lang.NoSuchMethodError: scala.Predef$.refArrayOps

前端 未结 10 957
刺人心
刺人心 2020-12-01 13:59

I have the following class:

import scala.util.{Success, Failure, Try}


class MyClass {

  def openFile(fileName: String): Try[String]  = {
    Failure( new          


        
10条回答
  •  情歌与酒
    2020-12-01 14:19

    scalatest_2.11 is the version of ScalaTest compatible only with Scala 2.11.x. Write libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.0" % "test" (note %%) instead to pick the correct version automatically and switch to Scala 2.11.8 until scalatest_2.12 is released (it should be very soon). See http://www.scala-sbt.org/0.13/docs/Cross-Build.html for more.

提交回复
热议问题