I am developing a simple Android application. But when I run Eclipse, it shows the following error:
Your project contains error(s), please fix it befo
I had similar problem where I couldn't run my project yet didn't see any problems in the code. In Error Log panel it said something like "Cannot add P/ to the list of segments P/ in as a parent". Restarting Eclipse solved the problem.
I saw this with an existing project. I had made a few edits, but hadn't imported anything new. Restarting Eclipse didn't help.
Project->Clean
did solve the problem.
I come across this error often when I import a new project in my workspace.
Reason: Some necessary files (Like R.Java
) is not generated in its respective packages.
Cure: Clean and build projects, All the files that needs to be auto generated will be there on place after building the project.
Best Luck.
This happened to me when I was experimenting with Maven.
Right click project -> Maven -> disable maven nature corrected the problem for me.
Simulate your self some error in class. Then save it and it would show more errors than you simulated. For me it was incorrect import and this helped.
Try changing your workspace. I am not sure this is the exact solution . I did face the same issue for sometime untill i changed my workspace.