问题
I'm running Eclipse Neon. Whenever I click on any of my projects and try to click clean or build it doesn't allow me to - it is greyed out. It doesn't matter if I make any changes to the code or do anything else, it never gives me the option to clean/build.
回答1:
It seems you have only general projects without builders: right-click on a project and choose Properties. In the Properties for ... dialog, in Builders look if there any builder listed. Without builders, your projects are probably configured incorrectly.
Builders (executed when project files are changed, e. g. incremental Java compiler) and natures (specifie which tooling is available) are set/stored in the .project
file (which are hidden in the Projects/Packages Explorer view, but shown in the Navigator view and which can be edit with a text or XML editor). For example, the .project
file of the plain Java project with the name and project folder Foo has the following content:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Foo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
If available, you may try right-click on a project and choose: Configure > Configure and detect nested projects...
来源:https://stackoverflow.com/questions/45626353/eclipse-doesnt-clean-or-build-any-projects