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

前端 未结 10 954
刺人心
刺人心 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:08

    Try adding the following line to your build.sbt

    libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test"
    

    your build.sbt should be like this:

    libraryDependencies += "org.scalactic" %% "scalactic" % "3.0.1"
    
    libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test"
    

    With this, the error for me is solved.

提交回复
热议问题