The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class

Posted 百里登风

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class相关的知识,希望对你有一定的参考价值。

问题描述

 

 

 

Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
	The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
	The method getText() from the type TagNode refers to the missing type CharSequence

	at com.dajiangtai.djt_spider.service.impl.YOUKUProcessService.<init>(YOUKUProcessService.java:22)
	at com.dajiangtai.djt_spider.start.StartDSJCount.main(StartDSJCount.java:28)

 

解决办法:

此异常是由于jre的版本不匹配导致的。笔者在使用java8时出现此问题解决方案为:配置项目的编译路径将jre换为更低版本,比如java6。

 

 我本来使用的是jdk1.8现在换回来myeclipse自带的1.6版本

 

 

 

 问题解决了!

以上是关于The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class的主要内容,如果未能解决你的问题,请参考以下文章

[WPF]The type name ‘App’ does not exist in the type '...'的问题

The method xx from the type xx refers to the missing type List等问题的解决办法

Array types are now written with the brackets around the element type问题的解决方法

返回suggester的类型(Returning the type of the suggester)

The parameter to the method is the basic data type

The hierarchy of the type is inconsistent错误问题