2016-07-15 139 views
0

我使用的是带有m2eclipse-scala插件的eclipse。目前,我得到了以下错误消息:与不兼容版本交叉编译

exampleA_2.10-2.0.1.jar of module build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page

它看起来像提取斯卡拉和Scala IDE匹配的版本。我只是想确保这是一个"false-negative"这里描述的,可以安全地关闭。

+0

你的问题是? – pedrofurla

+0

我怀疑这是一个误报,但根据你给我们提供的信息是不可能的。 –

回答

0

作为@The原型保罗建议,这是因为我使用了错误的Scala库。

如果您使用的是Scala 2.11(请参阅About Scala IDE -> installation details),您可以按照指令here进行降级。这比卸载和重新安装Scala IDE更容易,因为其他Stackoverflow帖子推荐。

0

我也遇到了同样的问题 - > 我想在scala中使用casbah jar来与mongodb集成。

分析问题后,我发现 - > 我试图卡斯巴2.9.1版本使用我的Scala版本是这样的错误2.11.8

根本原因是:你的罐子在2.9编译6.0版本和您正在使用Scala的2.11.8版本

因此,要解决,我使用编译到2.11阶版本 -

<groupId>org.mongodb</groupId> 
<artifactId>casbah-core_2.11</artifactId> 
<version>3.1.1</version> 
罐子