加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

scala – Eclipse在Play 2.4设置中显示错误

发布时间:2020-12-16 18:49:01 所属栏目:安全 来源:网络整理
导读:我正在尝试设置一个 Scala SDK基于 Eclipse的IDE,以便在Windows 8上使用Play 2.4.我按照 the official guide上给出的说明操作,但在打开默认视图index.scala.html之后,我收到了一堆错误,如: ambiguous reference to overloaded definition, both method disp
我正在尝试设置一个 Scala SDK基于 Eclipse的IDE,以便在Windows 8上使用Play 2.4.我按照 the official guide上给出的说明操作,但在打开默认视图index.scala.html之后,我收到了一堆错误,如:

>

ambiguous reference to overloaded definition,

both method display in
class BaseScalaTemplate of type (o: Any)(implicit m: Manifest[error])
and method display in class BaseScalaTemplate of type (x: error)
match argument types (play.twirl.api.HtmlFormat.Appendable) and
expected result type Any

Error occurred in an application involving default arguments.

index.scala.html /play-scala-test-app/app/views line 3

Java Problem

>

type Html is not a member of package play.api.templates

index.scala.html /play-scala-test-app/app/views line

Java Problem

我试图删除默认导入并在Play2项目属性中添加新的导入play.twirl.api._,但这没有改变.有没有办法修复配置?

解决方法

我不知道第一个问题,但第二个问题是由过时的SbtEclipse插件引起的.由于目标/ scala-2.11子文件夹未被添加为项目的源路径.
解决这个问题:

>将SbtEclipse插件版本升级到4.0.0:addSbtPlugin(“com.typesafe.sbteclipse”%“sbteclipse-plugin”%“4.0.0”)>从项目的根目录运行sbt eclipse>在Eclipse中刷新项目.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读