【问题标题】:How to Resolve 'not found: object anorm' for play 2.4.3如何解决播放 2.4.3 的“未找到:对象异常”
【发布时间】:2015-10-15 04:20:58
【问题描述】:

我正在使用 play 2.4.3,当我像导入异常时

导入异常。_ 导入 anorm.SqlParser._

这会在 IDE 中显示以下错误消息...

未找到:对象异常

但是我的项目会执行(不会抛出任何错误)。

依赖关系

libraryDependencies ++= Seq("com.typesafe.play" %% "anorm" % "2.3.6")

编辑器

月食

scala 版本

scalaVersion := "2.11.6"

激活器

版本 1.3.6

操作系统

Windows 8

【问题讨论】:

  • 看起来像一个 IDE 问题,您是否/可以尝试在 ide 之外使用 sbt 构建?

标签: eclipse scala playframework dependencies anorm


【解决方案1】:

您的导入不正确 - 它们应该是:

import anorm._
import anorm.SqlParser._

注意第二次导入的区别。

HTH

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-27
    • 2013-07-08
    • 1970-01-01
    • 2022-10-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多