问题描述
在包的字母'p'处,我在Java文件开头遇到错误
I am getting below error at the start of java file right at letter 'p' of package
内部编译器错误:java.lang.ClassCastException:org.eclipse无法在org.eclipse.jdt.internal.compiler.ast.ASTNode.resolveAnnotations(ASTNode.java:817)上将.jdt.internal.compiler.lookup.MethodBinding强制转换为org.eclipse.jdt.internal.compiler.lookup.FieldBinding
Internal compiler error: java.lang.ClassCastException: org.eclipse.jdt.internal.compiler.lookup.MethodBinding cannot be cast to org.eclipse.jdt.internal.compiler.lookup.FieldBinding at org.eclipse.jdt.internal.compiler.ast.ASTNode.resolveAnnotations(ASTNode.java:817)
项目从命令提示符下编译正常。但是eclipse显示此错误。我正在使用jdk8。
任何帮助都受到赞赏
Project compiles fine from command prompt. but eclipse is showing this error.I am using jdk 8.any help is highly appreciated
我尝试重新启动Eclipse,清理项目,安装不同版本的Eclipse等等。
I tried restarting eclipse, cleaning project, installing different versions of eclipse etc.
推荐答案
我遇到了类似的问题。原来是和。我恢复到Lombok 1.18.2使其再次工作。建议使用已关闭的Eclipse票证使用Lombok 1.16.18。
I had a similar issue. It turned out to be a compatibility issue between Lombok 1.18.8 and Eclipse 4.11. I reverted to Lombok 1.18.2 to get it working again. The Eclipse ticket that was closed recommends using Lombok 1.16.18.https://bugs.eclipse.org/bugs/show_bug.cgi?id=547244
这篇关于内部编译器错误:类广播异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!