解决 eclipse autowire cannot be resolved to a type

来源:互联网 发布:淘宝帐号安全申诉表单 编辑:程序博客网 时间:2024/05/16 04:41

参考: http://blog.csdn.net/zhouyingge1104/article/details/39031899

查了网上的回答,大概是这样的:机制所致。因为某些特殊原因,eclipse没能自动编译源代码到build/classes(或其他classes目录),导致类型查找不到。 
可能就是因为是来自另一个项目的原因导致的。

以下是解决的方法:

Windows–>Preferences–>Java–>Compiler–>Building–>Output folder–>

 勾选 Rebuild class files modified by others


其他问题:

java的maven项目报错:Failure to transfer xpp3:xpp3_min:pom:1.1.4c from 


原因:解析了多个 maven 仓库导致的,删除多余的仓库。

解决方法:删除$HOME/.m2/repository/xpp3中的xpp3_min-1.1.4c.pom.lastUpdated文件,然后刷新项目,就OK了!

0 0
原创粉丝点击