I then looked at my version information, and I discovered that buildship was now back to the old 1.0.21 version. I thought I got rid of this problem a long time ago. It’s now back.
The icon on the “build.gradle” file is a small red box, not the Gradle icon.
I also have another Gradle project in the same workspace, which except for the wrong icon on the Gradle files, seems to be working perfectly fine. No red marks, and when I “Refresh Gradle Project”, I see the normal output in the “[Gradle Model Retrievals]” console.
I compared the “.project” and “.settings/org.eclipse.buildship.core.prefs” files between both projects. There are some differences, but I can’t tell if any of the differences are telling.
In the “.project” files, the bad project also has a “javabuilder” buildCommand, in addition to the “gradleprojectbuilder”. I have a feeling that’s innocuous. In the “.settings” files, the following shows the meat of the diff of the two files:
And that is ALL it says. There’s nothing in the log. No indication of what about the file is invalid. However, I see that the contents of that file is identical in both of those projects, the diff of which is shown in my previous reply.
So, I then tried editing that file in one of the bad projects (in an external editor), and simply inserting the missing lines, compared to the “good” project. I then refreshed the bad project, and the error went away.
I don’t know what’s going on here, but at the least, I would think that the newer buildship is not dealing well with a prefs file that is in a slightly unexpected form, and I would think it should be able to deal with this.
Concerning that problem with 1.0.21 appearing again, I just noticed that on the update site at http://download.eclipse.org/releases/neon , where arguably should reside all the latest versions of the available plugins for Neon, the newest version of Buildship there is 1.0.21.
That’s not the definition of this update site. The site contains the version of the plugins that were released and approved together. If you want the latest and greatest of Buildship, you need to use the Buildship update sites.
Regarding broken config files, I encourage you to just remove the project from the workspace and reimport it with the Gradle import wizard.