【问题标题】:Play Framework compiles error in IDEAPlay Framework 在 IDEA 中编译错误
【发布时间】:2015-11-30 09:40:50
【问题描述】:

Mac平台,激活器为1.3.6,使用IDEA 15 CE。 我使用“activator new”创建了一个新的 Play-Java 项目,并且可以使用“activator compile”进行编译。

但是当我将项目导入IDEA时,选择SBT,我无法制作项目。 错误是:

Error:(1, 1) java: package org.junit does not exist
Error:(8, 24) java: package org.junit does not exist
Error:(18, 6) java: cannot find symbol
  symbol:   class Test
  location: class IntegrationTest
Error:(23, 17) java: cannot find symbol
  symbol: method assertTrue(boolean)

有人可以帮我吗?

【问题讨论】:

    标签: intellij-idea playframework intellij-15


    【解决方案1】:

    尝试在你的 build.sbt 中声明 junit 依赖为

    val jUnitVersion = "4.11" // replace appropriately
    
    libraryDependencies ++= Seq(
    // The rest of your dependencies
    "junit" % "junit" % jUnitVersion % Test
    )
    

    然后试试sbt clean run

    【讨论】:

      猜你喜欢
      • 2015-08-24
      • 2015-06-22
      • 1970-01-01
      • 2014-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多