Red exclamation mark in Eclipse with mercurial

23,291

Solution 1

Check the problem view. By exclamation it is usually means a problem with build path

Check the Build Path of the project by right clicking the project and select Build Path -> Configure Build Path.

One problem I often encountered is different people using different Java SDK and so when the exact SDK is not available in your machine, you need to change to your Java SDK (via JRE System Library -> Alternate JRE). A better way to avoid this problem is to always select the JRE System Library from Workspace default JRE or Execution Environment.

Solution 2

I solved the problem by adding the external .jar file in to my project. RightClick on the project -> Properties -> Java Build path -> libraries tab -> Add jar

Select your jar file and added it

Thats it the red ! mark gone.

Solution 3

Some times it happens that you have added a jar file earlier but currently not using it. Then after some time you delete the jar file from your system. But since you are not using the library file, so you will not get any error.But then you will see the red exclamation mark for the project. So all you need is to remove the added jar from the Build Path.

Done.....

Solution 4

It means there is a problem with the build path in your project. If it is an android project then it mostly means the target value specified in project.properties file cannot be found. This can also be caused because of other kinds of built problems. But it is shown mostly for built problems only. See here for more details. It is about built error decorater seen in eclipse.

An extract from that page:

Build path problems are sometimes easy to miss among other problems in a project. The Package Explorer and Project Explorer views now show a new decorator on Java projects and working sets that contain build path errors:

enter image description here

The concrete errors can be seen in the Problems view, and if you open the view menu and select Group By > Java Problem Type, they all show up in the Build Path category:

enter image description here

Solution 5

The Java Runtime Library was defined wrong for the pulled project.

It had to be reset under Project | Properties | Java Build Path | Libraries.

Share:
23,291
stanga
Author by

stanga

Updated on December 17, 2020

Comments

  • stanga
    stanga over 3 years

    I have imported a project with Mercurial (hg clone ...). When opening it with Eclipse, a red exclamation mark appears by the project's name in the Project Explorer, and it cannot be built. Silly messages like "import java.util cannot be resolved" appear, and errors in files are not marked in the Package Explorer.

    How can I resolve this?