libraryDependencies ++ and sbt

Hello everyone,
I am new to Scala, this is my first post.
I’d like to convert xml to json. I found this


could do the job.

But when I add this library in my sbt, it has error. So, I’d like to know how to use a library in Scala.

My steps are:

  1. add libraryDependencies libraryDependencies ++= Seq(…
    “org.json4s” %% “json4s-native” % “3.7.0”
    )

  2. import org.json4s._
    in my scala file

It does not compile and I have error: json4s._ is not a package of org.

Same thing with scala.xml: I put “org.scala-lang.modules” %% “scala-xml” % “1.1.1”, in build.sbt, import scala.xml_ in scala file and I go error

Thank you very much

Can you put all your code in github? If not, can you put here all your buidl.sbt as weell as your Scala file (with its path, e.g. src/main/scala/Main.scala).

Also, where are you seeing that error?

Thank you very but everything is working now: I just need to update the sbt file in IntelliJ.