3

I want to use this package in my scala sbt project:

import scala.util.parsing.json._

I'm able to run the code, but eclipse is detecting it as an error, saying:

object parsing is not a member of package util

I've tried to refresh folder, run sbt eclipse, also saw this link: How to have Eclipse recognize dependencies from SBT, nothing helped..

What can I do to avoid this?

Community
  • 1
  • 1
griffon vulture
  • 6,594
  • 6
  • 36
  • 57

2 Answers2

3

its a common problem with eclipse,you have to eclipsify your project.

activator eclipse

//i am using activator

and then clean and refresh(f5) your project.

Govind Singh
  • 15,282
  • 14
  • 72
  • 106
0

You need to depend on scala-parser-combinators. Add this to your sbt project, then run sbt eclipse:

libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.3"

Not sure why it works inside Sbt, it might be just that Sbt puts this dependency on your class path by default, or you're using an older version of Scala (parser combinators were moved out of the standard library in Scala 2.11.0)

Iulian Dragos
  • 5,692
  • 23
  • 31