Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Red exclamation mark in Eclipse with mercurial

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?

like image 828
stanga Avatar asked Jul 09 '10 09:07

stanga


People also ask

Why is there a red exclamation mark on my Eclipse project?

It means the jar files are missing from the path that you have given while configuring Build Path/adding jars to the project. Just once again configure the jars.

What does exclamation mark in red mean?

The red icon with an exclamation mark (!) indicates that the contact record for that person was recently created and has not been verified.


6 Answers

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.

like image 85
nanda Avatar answered Oct 08 '22 07:10

nanda


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.

like image 24
John Avatar answered Oct 08 '22 06:10

John


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.....

like image 22
Krishna Sinha Avatar answered Oct 08 '22 07:10

Krishna Sinha


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

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

like image 44
stanga Avatar answered Oct 08 '22 06:10

stanga


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

like image 35
Vincent Vettukal Avatar answered Oct 08 '22 08:10

Vincent Vettukal


I figured out each time i am trying to import a library into my android project, i have a red exclamation mark with both ActionBarSherlock and Facebook libraries

This is how i solved it:

After adding the library into your project "project properties->Android->Librairy->add"

If you are using Eclipse, all you have to do is to clean your project and build all your workspace:

"project -> clean... -> "clean selected project" -> build the entire workspace

like image 24
Francis Gauthier Avatar answered Oct 08 '22 06:10

Francis Gauthier