此项目使用Gradle构建,并且我还安装了最新版本的Groovy插件。请帮我搞定这件事情。谢谢。
编辑:
谢谢大家。问题解决了。看来我的Scala插件安装出现问题。一切的完整重装(包括Eclipse)都有所帮助。我不知道Eclipse / Scala-IDE的哪个版本您正在使用,但我知道这有时会发生两个原因:
$ b $ 1您没有安装Scala的JDT编织。< scala-ide使用方面将代码编织到JDT编译器中。如果你没有安装它,这可能会导致Scala文件被视为Java文件。
2)如果在某种程度上, Java源文件内容类型包含* .scala。实际上,它应该是 Scala Source File 。如果是这种情况,您应该从 Java源文件内容类型中移除* .scala。
I am giving a try to Scala Eclipse IDE after a very long time. I installed Eclipse and the said Scala plugin only a while ago, but I am unable to get stuff working. In all of the Scala files, I get the errors like following (See the tooltip):
This project uses Gradle for building, and I also have the latest version of Groovy plugin installed. Please help me get this thing working. Thanks.
Edit:
Thank you, everyone. The problem was solved. It appears there was a problem with my Scala plugin installation. A complete reinstall of everything (including Eclipse) helped. Also, this time I did not install the Groovy plugin.
解决方案I don't know which version of Eclipse / Scala-IDE you're using, but there are two reasons I know this sometimes happens:
1) You don't have JDT weaving for Scala installed.
The scala-ide uses aspects to weave in code into the JDT compiler. If you don't have this installed, this may cause the Scala files to be seen as Java files.
2) If, somehow, the Java Source File content type includes *.scala. In fact, it should be Scala Source File. If this is the case, you should remove the *.scala from the Java Source File content type.
更多推荐
Scala Eclipse IDE
发布评论