SBT scala 项目中的错误符号引用 [英] Bad symbolic reference in SBT scala project

查看:62
本文介绍了SBT scala 项目中的错误符号引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了一个小的重构,一切在语法上仍然是正确的,它应该可以编译.但是,我遇到了一个错误:

I did a small refactoring, everything is still syntactically correct and it should compile for sure. However, I got an error:

[error] bad symbolic reference. A signature in MyClass123.class refers to type MyClass456
[error] in package com.mypackage which is not available.
[error] It may be completely missing from the current classpath, or the version on
[error] the classpath might be incompatible with the version used when compiling MyClass123.class.
[error] one error found

没有改变其他任何东西.我什至将代码恢复到以前的未重构版本,但错误仍然存​​在.我也尝试重新加载 sbt.

I didn't change anything else. I even revert code to the previous, unrefactored version but the error remains. I tried to reload sbt also.

也许我需要以某种方式从 sbt 生成的文件中清除项目?如果没有,我该怎么办?

Maybe I need to clean the project from sbt generated files somehow? If not, what do I do?

推荐答案

我最好的猜测是您确实需要清理项目.只需输入 sbt clean.

My best guess is that you need, indeed, clean the project. Just type sbt clean.

这篇关于SBT scala 项目中的错误符号引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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