What is the reason for a red exclamation mark next to my project in Eclipse?
I have a red exclamation mark over my project n开发者_开发百科ame in Eclipse, looking like this -
.Does anyone know what this means and what I should I do about it?
There is a Problems view (try Window->Show View) which shows this kind of thing.
It's usually missing Jars (eg your project configuration references a jar that isn't there), and that kind of thing, in the case of JDT, but obviously these days Eclipse can be used in so many ways, it could be anything.
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:
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:
I also had this problem several times and I could 'solve' it by just deleting the messages in the "Problems"-tab and building the project again. Select the project and click on the menu bar Project -> Clean...
select your project again and okay.
There might be some deleted jar files already in build path. Right click on project. Properties->Java Build Path and removed deleted jar files from there.
There can be several reasons. Most of the times it may be some of the below reasons ,
- You have deleted some of the .jar files from your /lib folder
- You have added new .jar files
- you have added new .jar files which may be conflict with others
So what to do is we have to resolve those missing / updating / newly_added jar files.
- right click on the project and
go to properties
- Select
Java Build Path
- go to the
Libraries
tab - Remove the references of the jar files which you have removed already. There will be a red mark near them so you can identify them easily.
- Add the references to the newly added .jar files by using
Add JARs
- Refresh the project
This will solve the problem if it's because one of the above reasons.
This is probably a build problem. What fixed mine was updating the project with maven (Alt + F5)
Go to Project -> right click -> properties -> Java Build Path -> Libraries
Delete all the JARs which have red cross symbol on the icon.
Resolved.
Solutin 1:
step:1
Right click on your project -> Close Project. it will Close your project and all opened file(s) of the project
step:2
Right click on your project -> Open Project. it will Open your project and rebuild your project, Hope fully it will fix red exclamation mark
Solution 2:
Step:1
Right click on your Project -> Properties -> Java Build Path. Can you see missing in front of your library file(s) as per following screen-shot
Step:2 Click on Add Jar to select your Jar file if it is the placed in WEB-INF/lib of your project or Add External Jar if jar file placed somewhere on your computer
Step:3 Select the old missing file(s) and click on Remove click here for image
Solutioin 3: Right click on your Project -> Properties -> Java Build Path -> JRE System Library and reconfigure the JRE
and go to your project and remove .properties and .classpath in your project directories.
backup your project data and create a new one and follow the solutions 1 & 2
This is common, you will need to do the following steps:
1- Right click on the project
2- Build path
3- Configure Build Path
4- Remove jars/projects that had moved from their old path
5- clean the project
6- build the project "if not automatically built"
7- Add the jars/projects using their new locations
Run and that is it!
Mark Circular dependcies as "Warning" in Eclipse tool to avoid "A CYCLE WAS DETECTED IN THE BUILD PATH" error. In Eclipse got to :-> Windows -> Prefereneces -> Java-> Compiler -> Buliding -> Circular Depencies
Thanks
I Solved this problem by:
step 1: C:/user/rafiq/.m2/repository --> Delete this folder
Step 2: right click on your project-->maven-->update maven project-->check only clean project-->ok.
Step 3: right click on your project-->maven-->update maven project-->check only update project-->ok.
Problem Solved.
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.
Isn´t it a strange behavior? In my case, the mistake was that I added a jar-lib. But this lib was faulty, so I removed the lib. But, no matter what I´ve done, the error still exists. I removed the jar-file, even with the eclipse option "remove from build-path", deleted it on my project-folders and cleaned my project, but nothing worked. Only after I´ve done the way Qwert has described, it worked. But sould an IDE not independent from error messages? The error was fixed, only the messages caused the problem. Thanks to Qwert (if I got enough reputations, I will vote your answer. But now I am not able to, sorry).
I had a maven project giving me same thing. It showed that it couldnt find the jar with that version (dependency) and I knew its there and is correct -
So, for me the solution was to 1 delete the local repository. 2 Clean the project. 3 Disable the maven nature. 4 Generate eclipse artifacts and 5 re-configure as maven project.
(in order)
My problem concerning exclamation mark was in the section: "right click on project folder" - Properties - Libraries tab. There was an Error marked in red on a libray that probably wasn't in the right place so I removed it and ex. mark disappeared. The problem raised after deleting some old projects.
If your IDE doesn't find JRE from the path you given. Then you manually need to add JRE path in eclipse to remove red exclamation mark from the project. To do this please follow below steps :-
Go to to Properties>Java Build Path>Libraries> Click on Edit
Then Select Alternate JRE and click on Finish.
Note : If you don't have Java Run time Environment (JRE) installed, please install.
i was having the same problem....the actual issue was missing .jar file which took palce coz of changing my workspace. i just deleted the appcompat folder(which has the".jar" file) from my new workspace and copied it from my old workspace. this solved my problem.
This is may for one reason, If a project contains library project then you need to clean first the library project have been used, then clean the project contains that library project.
Mainly this problem occurs because your library files get deleted. The simple way to work your project as it was working previously is 1) Go to Project properties 2) Select java Build Path 3) Remove all library except jre. 4) Now add the same same jar file by clicking "Add external jars".
use this simple steps right click on the project->properties ->java Build path-> click on the jre system library and remove it after that step click on Add library and add a new jre system library that will resolve it!
For Maven project delete the project from IDE and run the maven command :-mvn eclipse:clean
,mvn eclipse:eclipse
,mvn clean install -e
.After this import the project on IDE. This stuff is works for me.
If you are facing same issue :
- Recall , if you have changed the place where you used to keep the jars and add it in build path .
- If you have moved your project from one machine to another then you need to right click on project-> Build Path -> Configure Build Path . In Tab Order and export you would see the place where eclipse is searching for jars , just keep it there and refresh the project.
- If above things don't work , try Project -> clean .
This is related to multiple versions of same depenendency in the local repository .m2
go to ur eclipse > problems tab > see the errors > go the local .m2 folder
delete all the non relevant versions of the the dependency which you have added recently.
then try to rebuild the project.
I too faced this strange situation. What I got to know is that, earlier I ran my spring projects with Spring version 1.5.4 and later for one project I chose version 2.0.1. That's when I got this error. When I visited POM and changed Spring version to 1.5.4 manually, the error was gone. What I guess is that, maven downloads the required JARs according to the Spring version specified. If you change the version, maven won't download JARs if those JARs are already downloaded for previous Spring version and found in .m2 source folder found as C: -> Users -> "Logged-In-User-Name" -> .m2 path.
What I did again was to keep the Spring version as it is (as 2.0.1), I opened the Problems view as said earlier and I deleted the JARs which were said as not found in the Problems view by visiting .m2 folder (the Paths were mentioned in the Problems view for were the JARs are). I then updated the maven and all problems were gone.
That's how I conclude that the problem was with JARs which were downloaded for the previous Spring versions in .m2 folder.
If you change the location of the jars from selenium-java-3.13.0 folder this mak will appear. So restore the original location of the jars and you are go to go.
In my case this is incorrect/improper dependency
Markers > Problems is highlighting
spring/.gradle/cache/httpcomponents.......pom is not valid archive
I removed
compile group: 'org.apache.httpcomponents', name: 'httpcomponents-client', version: '4.5.6', ext: 'pom'
changed to
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.6'
To Remove RED EXCLAMATION mark on project,
I have deleted all JAR files using BUILD Path--> LIBRARY --> ADD EXTERNAL JARs
and remove all
or selected JAR
.
Reinstall again.
This action resolve my issue with Red exclamation mark.
if you are using maven pom.xml then check whether you have used dependency for poi-ooxml-schemas. I was getting the red exclamation as I was using version 3.17. Changed the version to 4.1.2 and the red exclamation on maven disappeared. In other words what I meant to say was, use an updated version, this may help!!!
If it is maven project and your project view not having any issue. Then try the following steps
Right click the project ---> maven --> update maven
What worked for me (and probably not yet answered here till now) ::
While working on a Selenium project and ANT, I had copied and placed TWO different "BUILD.xml" files from 2 different sources in the Project's ROOT directory. This resulted in this RED-EXCLAMATION-MARK, which disappeared as soon as I moved one of the BUILD.xml file to another folder.
As to "why I had two BUILD.xml files in ONE project?", I was actually playing around with ANT's config from various BUILD.xml files.
精彩评论