IntelliJ Idea 14: cannot resolve symbol spark

后端 未结 6 1786
花落未央
花落未央 2021-02-09 13:55

I made a dependency of Spark which worked in my first project. But when I try to make a new project with Spark, my SBT does not import the external jars of org.apache.spark. The

6条回答
  •  佛祖请我去吃肉
    2021-02-09 14:28

    I had a similar problem. It seems the reason was that the build.sbt file was specifying the wrong version of scala.

    If you run spark-shell it'll say at some point the scala version used by Spark, e.g.

    Using Scala version 2.11.8
    

    Then I edited the line in the build.sbt file to point to that version and it worked.

提交回复
热议问题