Type java.lang.charsequence cannot be resolved.

Source: Internet
Author: User

These two days when doing the DRP project, encountered such a mistake:

  " the type Java.lang.Object cannot  be resolved. It  is indirectly referencedfrom required. class Files ", A look is all English I head big, but fortunately, I am fortunate that I live in the network age, hurriedly online search information:

This is a " type java.lang.charsequence can't solve " error (Baidu translation). This is mainly due to the issue of MyEclipse citing different versions of the JDK project. As we all know, each time we create a new project, MyEclipse will let us choose which version of the JDK to use, and I have two versions of jdk1.6 and jdk1.8 on my computer. So when there are multiple versions of the JDK on the computer, the development environment automatically chooses the default JRE. So we solve this error by the following scheme:

Follow this path to enter: window->preferences->java->installed JREs:

Then click Add->directy-> to select the JRE installation path (the default path at installation is c:/jdk1.8)-->finish:

This completes the setup of the JDK under the development environment, let's set the version in the project: on the project, right-click on the Select Properties option-Select Libraries tab-click Add library--> Select Jresystem Library-->next--Select the corresponding version of JRE-->finish under the alternate JRE:

Here the problem is basically solved, the project is no longer a red error warning. In fact, every small problem in the project can let us look at the problem from another angle, from the more aspects of the details we have not noticed, I hope this blog post can help everyone!


Type java.lang.charsequence cannot be resolved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.