a_dev
a_dev

Reputation: 21

error: package com.google.gson does not exist (in play framwork 2.0)

I am trying to use com.google.gson in my play framework2.0 project, I have included the jar files in libraries, and also mention them in my build.scala file, but it is still giving me the error : package com.google.gson does not exist.

My build.scala file looks like :

val appDependencies = Seq(
                    // Add your project dependencies here,

                    "com.google.gson" % "gson" % "2.2.2"
        )

and i have downloaded the jar files from here

please suggest should I include the all the three jar files in the build.scala? or my build.scala file is correct?

Upvotes: 0

Views: 2870

Answers (2)

user1931909
user1931909

Reputation: 11

You must used :

"com.google.code.gson" % "gson" % "2.2.2"

Upvotes: 1

i.am.michiel
i.am.michiel

Reputation: 10404

You have to do it one way or the other :

  • Include it in the build.scala file and let Play download it for you.
  • Or include the jar directly in the lib folder.

You should do it both ways.

And as was said in adis's comment : if you use an IDE have you reloaded it?

Upvotes: 0

Related Questions