maven 包导入正常,调用包中类提示错误

现象:

1. Java Build Path --> Libraries --> Maven Dependencies 没有报错;

2. 工程左侧没有错误提示,右侧代码里倒入包提示错误;

3. Problems窗口错误如下:DescriptionResourcePathLocationType

Archive for required library: 'D:/Develop/apache-maven-3.2.3/repository/org/springframework/spring-context/4.1.2.RELEASE/spring-context-4.1.2.RELEASE.jar' in project 'bugyun' cannot be read or is not a valid ZIP fileapi-livecourseBuild pathBuild Path Problem;

A:maven仓库repository下文件,我是从其他地方copy过来的,不是下载的;根据提示把有错误的包全部删除,重新下载,问题解决了。如果觉得自动下载慢的话,可以考虑手动下载,详情见:http://bugyun.iteye.com/blog/2298378 。

猜你喜欢

转载自bugyun.iteye.com/blog/2339828