2015-11-08 96 views
0

我正在從Coursera開始Scala課程。斯卡拉 - 對象junit不是包組織的成員

我必須包含以下行的測試文件:

import org.junit.runner.RunWith 

在這裏,我得到以下錯誤:

Multiple markers at this line: 
- object junit is not a member of package org 
- object junit is not a member of package org 

我的問題是類似這樣的: object scalatest is not a member of package org

我按照我的回答加入我的build.sbt

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

然而,當我在我的項目的根文件夾內的斯卡拉控制檯運行eclipse我得到:

<console>:11: error: not found: value eclipse 
     eclipse 
+1

您不在scala控制檯中運行eclipse任務,而是在sbt提示符下,或直接在shell/DOS命令行上調用'sbt eclipse「。 –

回答

2

相反的build.sbt,你需要添加線以上的plugins.sbt文件在您的項目夾。如果它不存在,你應該創建它。