MyEclipse报错:Multiple annotations found at this line: – String cannot be resolved to a type解决方法实测

  • Post author:
  • Post category:其他


异常代码如下:

Multiple annotations found at this line:
- String cannot be resolved to a type
- The method getContextPath() from the type HttpServletRequest refers to the missing type String


解决办法:

1.右击该项目 – Build Path – Configure Build Path , 在 Libraries 选项下,会发现有个出错的jre Libraries,将其Remove掉。

2.右击该项目 – Build Path – Add Library, 选择JRE System Library,选择Workspace defaulr JRE(jdk1.7)(此前JDK已成功安装并配置好), 然后 Finish 。

3.成功解决。

作者:Roger_CoderLife

链接:

https://blog.csdn.net/Roger_CoderLife/article/details/88171338

本文为Roger_CoderLife的原创文章,著作权归作者所有,转载请注明原文出处,欢迎转载!



版权声明:本文为Roger_CoderLife原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。