2017-10-04 88 views
2

我想建立一個基於框架的Scala項目使用sbt播放。當我嘗試從我的終端推出「SBT編譯」我得到幾個編譯錯誤類似以下:sbt編譯:幾個「對象不是包的views.html的成員」錯誤

[error] <project.dir>/app/controllers/Application.scala:229: 
object database is not a member of package views.html 
[error]  Ok(views.html.database(t2, JsonHelpers.TotalTip.langsForm)) 
[error]     ^

這是我build.sbt文件:

import play.sbt.PlayImport._ 
import com.typesafe.sbt.less.Import.LessKeys 

name := """<app_name>""" 
lazy val root = (project in file(".")) 
.enablePlugins(PlayScala) 
.enablePlugins(GatlingPlugin) 
.enablePlugins(BuildInfoPlugin, GitVersioning, GitBranchPrompt) 
.settings(
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion), 
buildInfoPackage := "app") 

https://github.com/puffnfresh/wartremover/issues/182 
wartremoverWarnings ++= Warts.unsafe.filter(_ != Wart.Throw) 

git.useGitDescribe := true 
routesGenerator := InjectedRoutesGenerator 
fork in run := true 
scalaVersion := "2.11.8" 
libraryDependencies += "com.typesafe.play" %% "play-json" % "2.5.4" 
libraryDependencies ++= Seq(
jdbc, 
cache, 
ws, 
filters, 
specs2 % Test, 
"com.typesafe.play" % "anorm_2.11" % "2.5.0", 
"org.webjars" % "bootstrap" % "3.3.2", 
"org.webjars" % "metisMenu" % "1.1.3", 
"org.webjars" % "morrisjs" % "0.5.1", 
"org.webjars" % "font-awesome" % "4.3.0", 
"org.webjars" % "jquery" % "2.1.3", 
"org.webjars" % "flot" % "0.8.3", 
"org.webjars" % "datatables" % "1.10.5", 
"org.webjars" % "datatables-plugins" % "1.10.5", 
"com.newrelic.agent.java" % "newrelic-agent" % "3.14.0", 
"com.newrelic.agent.java" % "newrelic-api" % "3.14.0", 
"org.pac4j" % "play-pac4j" % "2.6.2", 
"org.pac4j" % "pac4j-saml" % "1.9.5", 
"org.pac4j" % "pac4j-sql" % "1.9.5", 
"org.pac4j" % "pac4j-oidc" % "1.9.5" exclude("commons-io" , "commons-io"), 
"org.pac4j" % "pac4j-openid" % "1.9.5" exclude("xml-apis" , "xml-apis"), 
"org.pac4j" % "pac4j-jwt" % "1.9.5" exclude("commons-io" , "commons-io"), 
"org.pac4j" % "pac4j-mongo" % "1.9.5", 
"org.pac4j" % "pac4j-http" % "1.9.5", 
"org.pac4j" % "pac4j-oauth" % "1.9.5", 
"org.pac4j" % "pac4j-stormpath" % "1.9.5", 
"com.typesafe.play" % "play-cache_2.11" % "2.5.4", 
"org.pac4j" % "pac4j-http" % "1.9.5", 
"org.pac4j" % "pac4j-cas" % "1.9.5", 
"commons-io" % "commons-io" % "2.5" 
) 

includeFilter in (Assets, LessKeys.less) := "sb-admin-2.less" | "tables.less" 
libraryDependencies += "io.gatling.highcharts" % "gatling-charts-highcharts" % "2.1.7" 
libraryDependencies += "io.gatling"   % "gatling-test-framework" % "2.1.7" 
libraryDependencies += "org.scalaz" %% "scalaz-core" % "7.1.5" 
libraryDependencies += "org.reactivemongo" %% "reactivemongo" % "0.11.10" 
libraryDependencies += "io.swagger" %% "swagger-play2" % "1.6.0" 
libraryDependencies += "com.github.tototoshi" %% "play-json-naming" % "1.0.0" 
libraryDependencies += "com.github.tototoshi" %% "scala-csv" % "1.3.4" 
libraryDependencies += "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.8.7" 
libraryDependencies += "com.github.nscala-time" %% "nscala-time" % "2.16.0" 

resolvers ++= Seq(Resolver.mavenLocal, "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases", "Sonatype snapshots repository" at "https://oss.sonatype.org/content/repositories/snapshots/", "<internal repo>" at "<repo_url>") 

它是一個依賴問題?有沒有人有一個想法,爲什麼我得到這些錯誤?

感謝

回答

相關問題