xxx cannot be resolved to a type】的更多相关文章

同一个maven项目下的不同模块,无法导入其他模块的类,其他模块的所有类都报xxx cannot be resolved to a type 解决方案(参考): 项目Build Path -->Configure Build Path -->Libraries -->Add External JARs 把需要使用到的模块jar包导入 导入成功后,项目Referenced Libraries目录下会有导入的jar包…
(1)jdk不匹配(或不存在)     项目指定的jdk为“jdk1.6.0_18”,而当前eclipse使用的是“jdk1.6.0_22”.需要在BuildPath | Libraries,中做简单调整.     (2)jar包缺失或冲突     当找不到“XX”所在的jar包时,会报这个错.解决只需要找到(ctrl+点击,可能能看到jar包名称)对应jar包导入项目即可.     另外,出现相同的XX时也会报此错.可能需要调包.解包.选删.     (3)eclipse查找项目类型策略所致…
今天遇到这个情况,却发现是eclipse抽风,说javax.servlet.http.Cookie找不到定义,但是经过浏览器测试,可以运行,而JSP源文件中eclipse死活要报错.表示无语. 关于eclipse抽风的法则:先运行亲测,看看有没有exception,搞不好是eclipse在坑你... http://www.cnblogs.com/qrlozte/p/3191402.html 先写上吧,改天再遇到这个问题,如果真的报了exception,就再来补充…
1.jdk不匹配(或不存在)     项目指定的jdk为“jdk1.6.0_18”,而当前eclipse使用的是“jdk1.6.0_22”.需要在BuildPath | Libraries,中做简单调整. 一般在导入新项目, 或者eclipse创建一个新maven时, 会出现…
在操作一个功能模块的时候,出现一个问题: 我原则是按着项目指导一步一步走的,但却出现, QueryRunner cannot be resolved to a type,这个问题应该属于Xxx cannot be resolved to a type. 我解决方案: 我百度了QueryRunner包是:import org.apache.commons.dbutils.QueryRunner; 属于:org.apache.commons包下面的组件: 下载了一个: commons-dbutils…
小楼今天在做一个Java项目的时候遇到一个大家经常遇到的问题:XXX cannot be resolved to a type 看到一百多个errors时的时候,小楼也是被吓得赶紧去找度娘. 归纳一下小楼在网上看到的这种报错的主要的几种原因: 1.jdk不匹配(或不存在) 2.jar包缺失或冲突 3.eclipse查找项目类型策略所致 相应的解决方案是: 1.jdk不匹配(或不存在)时:例如项目指定的jdk为“jdk1.6.0_18”,而当前eclipse使用的是“jdk1.6.0_22”.需要…
遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....,查找的解决办法如下: 一: 错误提示: It is indirectly referenced from required .class file 错误的解决 原因:你导入得jar依赖另一个jar 解决方法:导入缺失的包…
在Eclipse中遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....,查找的解决办法如下: 一: It is indirectly referenced from required .class file 原因:你正要使用的类调用了另一个类,而这个类又调用了其他类,这种关系可能会有好多层.而在这个调用的过程中,某个类所在的包的缺失就会造成以上那个错误. 解…
在Eclipse中遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....,查找的解决办法如下: 一: It is indirectly referenced from required .class file 原因:你正要使用的类调用了另一个类,而这个类又调用了其他类,这种关系可能会有好多层.而在这个调用的过程中,某个类所在的包的缺失就会造成以上那个错误. 解…
问题: ImageView cannot be resolved to a type 报这样的错误是没有加载MainActivity.java文件中加入 import android.widget.ImageView; 为了避免类似错语,可以这样的写 import android.widget.*; 这样的写的好处是以后遇到类似EditText,TextView等都可以解决.…
从SVN上下载项目,所有代码都有下来,在本地编译,java类总是报出n多红叉,惨不忍睹,String cannot be resolved to a type都出来了,以为是jar包未被加载,于是project-properties--java build path -- libraries,删掉已经存在的jar包,去workspace下重新加载jar包,不可以. project-properties--java complier- configure workspace settings 把j…
eclipse中遇到了“XX cannot be resolved to a type”的报错信息.网上找了些资料,本文将做以简单总结.     (1)jdk不匹配(或不存在) 项目指定的jdk为“jdk1.6.0_18”,而当前eclipse使用的是“jdk1.6.0_22”.需要在BuildPath | Libraries,中做简单调整. (2)jar包缺失或冲突 当找不到“XX”所在的jar包时,会报这个错.解决只需要找到(ctrl+点击,可能能看到jar包名称)对应jar包导入项目即可.…
在页面中使用全局路径时${pageContext.request.contextPath}出现javax.servlet.ServletException cannot be resolved to a type错误,解决方法如下:这个错误主要是因为缺少jsp-api.jar 和  servlet-api.jar这两个Jar包.第一种解决方法:直接把 Tomcat7.0 下lib目录中的 jsp-api.jar 添加  Build path 中.第二种解决方法:使用 Maven 将 jsp-ap…
eclipse中编译时enum出现cannot be resolved to a type错误 通常是因为eclise使用的jdk版本的问题...默认是使用的是jdk1.5 应该去选择成jdk1.6或者更高的版本. 项目右键->properties->Java Compiler->Compiler Compliance level 选择更高的版本 参考: http://stackoverflow.com/questions/3811012/can-not-compile-enums-in…
错误:The import XXX cannot be resolved弄了好久,import类的都没问题,但就是报错.选择project --> clean后,OK.如果还不行,删掉全部import,然后按alt+/提示,逐个导入.…
javax.servlet.jsp.PageContext cannot be resolved to a type javax.servlet.jsp.JspException cannot be resolved to a type 解决这个异常需要加入:jsp-api.jar在tomcat安装目录的libs中有. 同样如果servlet异常需要加入servlet-api.jar tomcat也有的.  …
原:http://www.cnblogs.com/xuxm2007/archive/2011/10/20/2219104.html Eclipse “cannot be resolved to a type” error http://chenxiaohu612.blog.163.com/blog/static/192214286201171004911955/ http://zhaoningbo.iteye.com/blog/1137215   引言:     eclipse新导入的项目经常可…
刚开始学习Servlet,在Eclipse中新建了一个Servlet,不过页面上报错: Httpservlet cannot be resolved to a type,显然是Eclipse找不到相应的包,即javax.servlet. 原因: jdk 里不包括servlet-api.jar 这个包,此包在Tomcat 中存在 项目名--> 右键 Properties--> 选择 Java Build Path--> 选择 Add External JARs--> 选择 把serv…
转自:http://zhaoningbo.iteye.com/blog/1137215 引言: eclipse新导入的项目经常可以看到“XX cannot be resolved to a type”的报错信息.本文将做以简单总结. 正文: (1)jdk不匹配(或不存在) 项目指定的jdk为“jdk1.6.0_18”,而当前eclipse使用的是“jdk1.6.0_22”.需要在BuildPath | Libraries,中做简单调整. (2)jar包缺失或冲突 当找不到“XX”所在的jar包时…
在eclipse环境下用maven出现:javax.servlet.jsp.PageContext cannot be resolved to a type. 这是由于没有引入jsp-api引发的问题.在pom.xml引入: <dependency> <span style="white-space:pre"> </span><groupId>javax.servlet</groupId> <artifactId>…
eclipse报autowired cannot be resolved to a type的错误,一般情况是依赖的JDK或者jar包有问题,检查build path可以排查文件,我今天遇到这个情况,是因为我新导入的项目,没有在eclipse里maven关联,在eclipse里右键点击项目,然后选择第一项关联maven就好了.或者也许可以直接在import的时候选择maven目录下的引入maven项目选项.…
在 STS 上,一个类引用在相同 package 中另一个类,但是报 cannot be resolved to a type 错误. 解决方法 : Alternatively, you can highlight the project : Choose Clean ... from Project menu and if you have activated the Build Automatically option (in the same menu), the classes will…
出现 User cannot be resolved to a type 不知道具体问题出在哪里但是我经过将全路径输入并保存后错误消失 将User选上,然后点击保存就可以了! 最后我发现错误消失了!…
错误调试解析: An error occurred at line: XX in the jsp file: /XX.jsp XX cannot be resolved to a type 解决方法: 一. 检查是否导入相应的包,在页面开头引入相应的包 <%@ page import="xx.Xx" %> 二. 因为某些特殊原因,MyEclipse没能自动编译源代码到build/classes(或其他classes目录), 导致类型查找不到,可能是MyEclipse未编译自…
"the import android.support.v7 cannot be resolved  " or "ActionBarActivity: cannot be resolved to a type": missing android-sdk\extras\android\support\v7\appcompat\. need to install android 4.4.2 (api 19) in sdk 版权声明:本文博主原创文章,博客,未经同意不得转…
场景:在项目开发时,一个工程引用另一个工程中的文件,出现报错“XX cannot be resolved to a type”,但是在实际通过跟踪“F3”能够找到相应的文件,最终用方法4解决. 引言: eclipse新导入的项目经常可以看到“XX cannot be resolved to a type”的报错信息.本文将做以简单总结. 正文: 1 jdk不匹配(或不存在 ) 项目指定的jdk为“jdk1.6.0_18”,而当前eclipse使用的是“jdk1.6.0_22”.需要在BuildP…
问题描述:HttpServletRequest cannot be resolved to a type.Multiple markers at this line - The import javax.servlet.http cannot be resolved - The import javax.servlet.http cannot be resolved - The import javax.servlet.http cannot be resolved解决方案: 1.这个错误可能是…
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 解决办法: 首先 右击该项目 - Build Path - Configure Build Path , 在 Libraries 选项下,会发现有个出错…
没找到所使用的类所在的类定义,一般常见于使用了外部jar中的类,但有对应的import语句.比如,如果程序中使用了ArrayList这个类,但你程序类文件的最开始import部分如果没有import java.util.ArrayList;这句话的话,ArrayList出线的地方就会报ArrayList cannot be resolved to a type. .…
编写自动化测试用例一个新创建的用例中类继承了其他类,由于未知原因,eclipse没能自动编译源代码到build/classes(或其他classes目录)代码一直报错XXX cannot be resolved to a type,通过clean project 解决了该问题. 鼠标移动到工具条上,点击Project,显示一个弹窗,点击Clean...之后,代码不再报错.…