无法运行 Activator 模板项目 Activator UI 无法加载 SBT 配置 [英] Can't Run Activator Template projects Activator UI Failed to load SBT configuration

查看:16
本文介绍了无法运行 Activator 模板项目 Activator UI 无法加载 SBT 配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Play Framework 和 Scala 以及这款出色的工具激活器的新手.

I am new to Play Framework and Scala and this amazing tool activator.

我无法运行运行 play 框架的模板项目(例如:hello-play-scala),但能够很好地运行 hello-scala(非 playframework).

I am unable to run template projects that run play framework (eg: hello-play-scala) but able to run hello-scala (non playframework) well.

我正在运行激活器 1.3.5

I am running activator 1.3.5

我得到的错误是:

H:ProjectPlayFrameworkTesthello-play-javauild.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 是:

And the build.sbt is :

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 是

and Plugins.sbt is

// 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 是

and the build.properties is

#Activator-generated Properties
#Fri Aug 21 23:24:51 NPT 2015
template.uuid=b7274e52-c226-4deb-bb0e-ab2fdb8f4767
sbt.version=0.13.2

推荐答案

我在 Windows 8.1 上遇到了同样的问题,在谷歌搜索解决方案后,我最初尝试更新我的一些插件.(结果证明只有 sbt-less 有点过时.)但是,这并没有解决问题.

I was having the same problem on Windows 8.1, and after googling for a solution, I initially tried to update some of my plugins. (It turned out that only sbt-less was a bit out of date.) However, that did not resolve the matter.

所以,我发现了几个提到同样问题的网页,似乎那些在他们的 ~/.sbt/repositories 文件(Windows 上的 C:/Users//.sbt/repositories 文件)能够以这种方式解决问题.因此,我将 ~/.sbt/repositories 文件中的两个 file://// 模式更改为 file:///.

So, I found a couple of Web pages that mentioned the same problem, and it seemed that folks who adjusted the number of forward slashes in their ~/.sbt/repositories file (C:/Users/<username>/.sbt/repositories file on Windows) were able to resolve the matter that way. So, I changed both of the file://// patterns in my ~/.sbt/repositories file to file:///.

然后我停止了我的 activator,杀死了它产生的所有遗留的 Java 实例,删除了我的 /RUNNING_PID 文件并重新启动了 激活器.现在,事情似乎奏效了.

Then I stopped my activator, killed all of the lingering instances of Java that it had spawned, deleted my <project_directory>/RUNNING_PID file and restarted activator. Now, things seem to be working.

仅供参考,以下是我发现的有关该问题的两个最有用的页面:

FYI, here are the two most helpful pages that I found regarding the problem:

这篇关于无法运行 Activator 模板项目 Activator UI 无法加载 SBT 配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆