Scala工作表在Intellij中不起作用 [英] Scala worksheet not working in Intellij

查看:561
本文介绍了Scala工作表在Intellij中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Intellij-IDEA 13.1.2。
我使用scala-plugin。
我正在尝试使用工作表来评估代码。

I have Intellij-IDEA 13.1.2. [edited, previously 13.0.2] I use the scala-plugin. I'm trying to use worksheets to evaluate code.

但我得到的只是两个错误:

But all I got are two errors :

bad macro impl binding: versionFormat is supposed to be there
Unable to read an event from: rO0ABXNyADVvcmcuamV0YnJhaW5zLmpwcy5pbmNyZW1lbnRhbC...

我可以正常运行scala控制台并在其中执行我的代码,
但工作表不起作用。
如果我的代码不正确,它会输出一个错误,指示解释器无法解析我的代码。只有当我的代码正确时,我才会收到错误的宏impl绑定错误。

I can run the scala console normally and execute my code in it, but the worksheet doesn't function. If my code is incorrect, it outputs an error indicating the interpreter failed to parse my code. I got the "bad macro impl binding" error only if my code is correct.

我尝试创建一个新项目,但它没有用。
我按照教程在intellij中配置了scala,但它也没有帮助。

I tried creating a new project, but it didn't work. I followed tutorial to configure scala in intellij but it didn't help either.

我可能错过了一个重要的配置步骤吗?这个错误意味着什么?

Is there an important configuration step I may have missed ? What does that error mean ?

编辑:我在我的工作表中尝试过最简单的事情,如1或var x = 1或println(Hello World!)

EDIT : I tried the simplest thing in my worksheet like 1 or var x = 1 or println("Hello World!")

EDIT2:我不知道我改变了什么,但现在又出现了另一个错误:
错误:加载MacroPrinter时出错,导致MacroPrinter所需的类文件丢失。
参考值包反射的宏指的是不存在的符号。

I'm not sure what I changed but now I have another error : Error:error while loading MacroPrinter, class file needed by MacroPrinter is missing. reference value macros of package reflect refers to nonexisting symbol.

更新:现在它在Intellij 13.1.5下工作正常,Scala插件0.41.2与两个scala -2.10和2.11

UPDATE: Now it works fine under Intellij 13.1.5, Scala plugin 0.41.2 with both scala-2.10 and 2.11

推荐答案

我有无法读取事件问题并从Scala 2.11.0切换到Scala 2.10.4为我修好了。

I had the "Unable to read an event from" issue and switching from Scala 2.11.0 to Scala 2.10.4 fixed it for me.

这篇关于Scala工作表在Intellij中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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