2016-09-20 8 views
0

私は数年間コードを作成せず、今すぐゲームに戻ろうとしています。私は非常に単純なスカラプロジェクトを設定しようとしていますHelloWorldとsbtコンソールからコンパイルしようとすると、次のエラーメッセージが表示されます。私はsbteclipseプラグインを追加してEclipseプロジェクトの設定を生成していました。私はScalaのバージョン2.11.8醸造からインストール 0.13.12 SBTとMacOSのシエラの午前単純なスケーラプロジェクトを設定できませんでした

[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] ::   UNRESOLVED DEPENDENCIES   :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] 
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes. 
[warn]  com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13) 
[warn] 
[warn] Note: Unresolved dependencies path: 
[warn]  com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13) (/Users/michael/Development/Scala-Testings/HelloWorld/project/plugins.sbt#L3-4) 
[warn]  +- default:helloworld-build:0.1-SNAPSHOT (scalaVersion=2.11, sbtVersion=0.13) 
sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found 

。 HelloWorld.scala

プロジェクトのディレクトリ構造

src 
+- main 
    +- scala 
     +- HelloWorld.scala 
project 
+- plugins.sbt 
build.sbt 

build.sbtの内容

name := "HelloWorld" 

version := "1.0" 

scalaVersion := "2.11.8" 

plugins.sbtの内容

logLevel := Level.Warn 

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0") 

コンテンツ

object HelloWorld extends App { 
    def main (args Array[String]) : Unit = { 
     println ("HelloWorld!") 
    } 
} 
+0

WFMに置くことによって働くそれを得ました。 eclipseコマンドが実行されます。それは良いニュースか悪いニュースですか?最終的にsbtがコンパイルしようとすると、コードに2つのエラーがあります。 –

+0

リゾルバが必要ですか?私はactivatorと 'activator new'をインストールすることをお勧めします:http://www.lightbend.com/community/core-tools/activator-and-sbt – pedrorijo91

+0

ええ、私はそれを取り除くことによって働いています addSbtPlugin(" com。 project_folder/project/plugins.sbt から〜/ .sbt/0.13/plugins/plugins.sbtファイルを入力してください。 – Michael

答えて

0

問題はScala 2.11.8がインストールされている間にScalaバージョン2.10.xでコンパイルされたsbtバージョン0.13.12と関係があります。

私は

project_folder/project/plugins.sbt 

から

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0") 

を除去して

~/.sbt/0.13/plugins/plugins.sbt file. 
関連する問題