問題描述
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版本
問題解決了!