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

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

    In my case, I had a project jar dependency which was depending on a different version of scala. This was found under Project Structure -> Modules -> (selected project) -> Dependencies tab. Everything else in the project and its libraries lined up in scala version (2.12), but the other jar was hiding a transitive dependency on an older version (2.11).

提交回复
热议问题