As an Eclipse user, I always liked the Gradle IDE. However, this plugin is now deprecated in favor of the new Buildship plugin.
After setting up a fresh Eclipse IDE with Buildship installed, I'm faced with the following error in all my Gradle projects:
missing gradle project configuration file: .settings/org.eclipse.buildship.core.prefs
There are several pages on google that deal with this issue, but all of them seem pretty outdated. There is also an entry in the bugtracker of the plugin which is set to "CLOSED FIXED". Well, apparently, it's not fixed.
Am I doing something wrong? Any ideas how to tackle this issue?
In Eclipse, select File > Export. In the window that appears, open Android and select Generate Gradle build files. Select the project you want to export for Android Studio and click Finish.
Buildship is an Eclipse plugin that allows you to build applications and libraries using Gradle through your IDE.
Go to the New project wizard (Ctrl-N) of STS Eclipse and create a Gradle project. On the Gradle Projec t wizard , assign a name for your project and choose Java Quickstart for the Sample project option. Click Finish and it will take a while to create, build, clean, and install your Gradle STS project.
I've figured it out myself. The issue with the "missing gradle project configuration file" arises from the way the gradle project(s) are imported into Eclipse.
When importing a gradle project via the regular File -> Import -> General -> Existing Project into Workspace
command, then it will not work and produce the aforementioned error.
However, if you import the very same project via File -> Import -> Gradle -> Existing Gradle Project
, then you get a different import wizard, and with this wizard, it works like a charm.
I still think it's a bug because the choice of the import wizard should not matter. Still, choosing the proper wizard is a viable workaround.
Another option is to:
sh gradlew cleaneclipse
Win: gradlew cleaneclipse
Requires the apply plugin: 'eclipse'
in your build.gradle
sh gradlew eclipse
Win: gradlew eclipse
Now the gradle nature will be missing in your eclipse-project. Open the context menu of your project -> configure -> add gradle nature
Now everything should be fine again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With