Reputation: 321
I have an application which uses play framework. I am trying to start using the activator command "activator clean compile run" on compiling the code it is showing the error
object Html is not a member of package play.api.templates [error] import play.api.templates.{Html, Txt}
Any idea how to fix this thanks in advance.
Upvotes: 2
Views: 866
Reputation: 1242
You are probably trying to run code written for an earlier version of Play with Play 2.4. play.api.templates.Html
has been deprecated in Play 2.3 and has apparently been removed in 2.4.
From the Play 2.3 Package documentation for Html
:
Deprecated
(Since version 2.3.0) Use play.twirl.api.Html
You can also refer to the Templates section of the Play 2.3 migration guide.
The Play version which is used is defined in project/plugins.sbt. The relevant plugin is "com.typesafe.play" % "sbt-plugin".
Upvotes: 4