Make sure the SBT has entries like this:
scalaVersion := "2.11.8" libraryDependencies ++= Seq( "org.apache.spark" %% "spark-core" % "2.1.0", "org.apache.spark" %% "spark-sql" % "2.1.0" )
Then make sure that IntelliJ is aware of these libraries, either by turning on “automatic import” or by doing it manually by clicking the “Update” button on the SBT panel.
Vidya source share