IntelliJ IDEA报告路径错误 [英] IntelliJ IDEA reports errors in routes

查看:675
本文介绍了IntelliJ IDEA报告路径错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 我创建了一个项目 activator new play-scala-intro play-scala-intro

  2. 在IDEA中,我点击文件 - > 从现有来源导入项目并选择 SBT

  1. I've created a project by activator new play-scala-intro play-scala-intro
  2. In IDEA I've clicked File -> Import project from Existing sources and selected SBT.

这是默认的项目结构:

This is default project structure:

我也尝试了来自 here (建议用于Play 2.2 - 2.3,而我有Play 2.4)。但我没有尝试将 target / scala - * / classes_managed 添加到源,因为我的项目不包含此文件夹。

I've also tried all tips from here (suggested for for Play 2.2 — 2.3, whereas I have Play 2.4). But I haven't tried to add target/scala-*/classes_managed to sources because my project doesn't contain this folder.


  • 我有Idea 14 Ultimate,安装了Scala和Playframework支持插件。

  • Play Framework: addSbtPlugin(com.typesafe.play%sbt-plugin%2.4.1)

  • scalaVersion:=2.11.6

  • I have Idea 14 Ultimate with installed "Scala" and "Playframework support" plugins.
  • Play Framework: addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.1")
  • scalaVersion := "2.11.6"

推荐答案

JetBrains尚未更新他们的Scala / Play插件以反映Play 2.4的新路由结构(例如,使用类而不是控制器的对象)。你可以忽略这些错误,运行应用程序就可以了。

JetBrains hasn't yet updated their Scala/Play plugin to reflect the new routing structure with Play 2.4 (using classes instead of objects for the controllers, for example). You can ignore those errors, run the app and it'll be all fine.

https://youtrack.jetbrains.com/issue/SCL-8812 了解更多信息。一条评论说:这在最近的EAP Build of IntelliJ和Scala 1.6.27.1.EAP中得到修复,IntelliJ EAP 15在他目前的状态下看起来非常好。

See the ongoing issue ticket over on https://youtrack.jetbrains.com/issue/SCL-8812 for more. One comment says: "This got fixed in the recent EAP Build of IntelliJ and Scala 1.6.27.1.EAP also IntelliJ EAP 15 looks really good in his current state."

您可以等待IntelliJ 15.同时,忽略IntelliJ 14和旧版本错误标记的错误。

You can wait for IntelliJ 15. In the meanwhile, ignore the errors which are wrongly flagged by IntelliJ 14 and older versions.

这篇关于IntelliJ IDEA报告路径错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆