我正在尝试使用Play Framework,但我在使用初学者项目时遇到了麻烦。
我使用网站上描述的giter8模板: - https://playframework.com/download
$ sbt new playframework/play-java-seed.g8
我必须使用较旧版本的Play版本,因为我在以下版本上运行当前项目: -
Play Framework :2.3.10
Scala版本:2.11.6
sbt version 0.13.12
生成应用程序后。我跑了
$ sbt clean compile
我得到了
/play-by-example/build.sbt:10: error: not found: value guice
libraryDependencies += guice
^
[error] Type error in expression
所以我更新了build.sbt,如下所示
libraryDependencies += "com.google.inject" % "guice" % "3.0"
我得到以下编译错误: -
[error] /play-by-example/conf/routes:6: value index is not a member of
object controllers.HomeController
[error] GET / controllers.HomeController.index
[error] /play-by-example/conf/routes:6: value index is not a member of
object controllers.HomeController
[error] GET / controllers.HomeController.index
[error] two errors found
[error] (compile:compileIncremental) Compilation failed
有没有人遇到过可以帮助我的同样问题? 感谢。