找不到类型:当类型在src_managed文件夹中时,类型.. [英] Type not found: type .. when type is in src_managed folder

查看:54
本文介绍了找不到类型:当类型在src_managed文件夹中时,类型..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

sbt eclipse 之后,当我将项目导入到eclipse工作区时,出现了

After sbt eclipse, when I import a project to my eclipse workspace, I get the error that

找不到

类型:X

type not found:X

当我搜索X类型时,我在同一项目的src_managed文件夹中找到它.

When I search for that type X, I find it in the src_managed folder of the same project.

  • 我正在使用Scala IDE 4.0.0 RC2
  • 我已将Scala安装设置为项目(2.10.4)
  • 它没有任何依赖的项目
  • 我可以在sbt中编译它,即sbt.{project myProject,compile}.注意:执行此操作后,我返回并在Eclipse中刷新项目,突然所有错误似乎"消失了,但是如果单击特定文件,该错误仍然存​​在.它只是没有显示在程序包资源管理器"和问题视图"中.

推荐答案

说,生成的代码位于target/scala-2_10/src_managed/main/compiled_avro/org/...

Say, the generated code is in target/scala-2_10/src_managed/main/compiled_avro/org/...

然后我必须在"Java构建路径"->源"->添加文件夹"->选择已编译代码"文件夹中添加生成代码的源文件夹.

then I had to add the source folder for the generated code in Java Build Path -> Source -> Add Folder -> Select the folder compiled_avro.

这篇关于找不到类型:当类型在src_managed文件夹中时,类型..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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