Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
372 views
in Technique[技术] by (71.8m points)

java - Can't Run Activator Template projects Activator UI Failed to load SBT configuration

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

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

I am running activator 1.3.5

The error I get is :

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.

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

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")

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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

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:///.

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:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...