我刚开始玩框架、Scala和这个神奇的工具激活器。
我无法运行运行play框架的模板项目(例如:hello),但是能够很好地运行hello-scala (非剧本框架)。
我正在运行激活剂1.3.5
我得到的错误是:
H:\Project\PlayFrameworkTest\hello-play-java\build.sbt:12: error: reference to fork is ambiguous;
it is imported twice in the same scope by
import _root_.play.Project._
and import Keys._
fork in run := true
^
Type error in expression
Failed to load project.build.sbt是:
name := """hello-play-java"""
version := "1.0-SNAPSHOT"
libraryDependencies ++= Seq(
"org.webjars" %% "webjars-play" % "2.2.2",
"org.webjars" % "bootstrap" % "2.3.1")
playJavaSettings
fork in run := true而Plugins.sbt是
// Comment to get more information during initialization
logLevel := Level.Warn
// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.2")而build.properties是
#Activator-generated Properties
#Fri Aug 21 23:24:51 NPT 2015
template.uuid=b7274e52-c226-4deb-bb0e-ab2fdb8f4767
sbt.version=0.13.2发布于 2015-12-18 02:04:51
我在Windows8.1上也遇到了同样的问题,在谷歌搜索解决方案之后,我开始尝试更新我的插件。(事实证明,只有sbt是有点过时了。)然而,这并没有解决这一问题。
因此,我发现有几个网页提到了同样的问题,似乎调整了~/.sbt/repositories文件(C:/Users/<username>/.sbt/repositories文件)中的正斜杠数的人能够这样解决问题。因此,我将~/.sbt/repositories文件中的两个~/.sbt/repositories模式更改为file:///。
然后我停止了我的activator,杀死了它产生的所有挥之不去的Java实例,删除了我的<project_directory>/RUNNING_PID文件并重新启动了activator。现在,事情似乎在起作用。
FYI,以下是我发现的关于这个问题的两个最有帮助的页面:
https://stackoverflow.com/questions/32155681
复制相似问题