Eclipse error: "Path must include project and resource name" on invoking clean

780 views Asked by At

I have imported a project and when I try to clean it. I get the following error:

Errors occurred during the build. Errors running builder 'CDT Builder' on project 'test_sp'. Path must include project and resource name: /test_sp

I have tried checking all the setting but cannot figure out what is causing the issue.

My session data is

java.version=1.7.0_10
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  
Command-line arguments:  -os win32 -ws win32 -arch x86_64

I get the following stack trace for the exception:

java.lang.IllegalArgumentException: Path must include project and resource name: /test_sp
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:2169)
at org.eclipse.core.internal.resources.Container.getFile(Container.java:208)
at org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildDescription.addInput(BuildDescription.java:1931)
at org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildDescription.addInput(BuildDescription.java:1895)
at org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildDescription.calculateInputs(BuildDescription.java:1624)
at org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildDescription.handleMultiSteps(BuildDescription.java:835)
at org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildDescription.initDescription(BuildDescription.java:752)
at org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildDescription.init(BuildDescription.java:814)
at org.eclipse.cdt.managedbuilder.internal.buildmodel.DefaultBuildDescriptionFactory.createBuildDescription(DefaultBuildDescriptionFactory.java:45)
at org.eclipse.cdt.managedbuilder.buildmodel.BuildDescriptionManager.createBuildDescription(BuildDescriptionManager.java:107)
at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.cleanWithInternalBuilder(CommonBuilder.java:1180)
at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.clean(CommonBuilder.java:1098)
at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.clean(CommonBuilder.java:1046)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:513)
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:432)
at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:305)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

Have been stuck on this for a week now, any pointers would be helpful. I have tried other similar solutions but they are very specific to android and so not working. One thing to note is that it builds fine, only while cleaning it is giving this error.

This is C++ code.

1

There are 1 answers

0
tn3rt On

There's a chance this may be a bug. Try updating your version of Eclipse. The other possibility is that you're trying to build Java code with the CDT Builder, which is C++. You should make that clear in your question. It doesn't make sense to tag this question as both Java and C++.