score:48
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.
score:1
maybe you can use this method. by making the file back
I accidentally deleted or lost the file in my flutter project.
then I make a new method
enter the ./android
folder in your flutter project.
copy to your terminal for mac:
touch "org.eclipse.buildship.core.prefs"; echo "connection.project.dir=
eclipse.preferences.version=1" >> org.eclipse.buildship.core.prefs
then to your ./android/app
folder in your flutter project.
touch "org.eclipse.buildship.core.prefs"; echo "connection.project.dir=..
eclipse.preferences.version=1" >> org.eclipse.buildship.core.prefs
score:1
Step 1
Right-click on your project name in IDE > Properties > Project Natures > Choose Gradle Project Nature
on the right pane > Remove > Apply and Close
Step 2
Right-click on your project name in IDE > Configure > Add Gradle Nature
Result
Give it a few seconds for Gradle to synchronize with the IDE, and
.settings
file will be automatically generated in the project root.
Delete error
Delete the error in Problems
view.
score:3
The easiest solution, using just the mouse
As is told here by oehme (Stefan Oehme - core dev):
https://github.com/eclipse/buildship/issues/504
"Buildship can't recreate that file as it cannot know what your root project was (Gradle supports arbitrary project layouts). You should either check the settings file in or not check in any Eclipse files at all. Checking in .project while leaving out .settings is not supported."
Or here (Stefan Oehme - core dev):
https://discuss.gradle.org/t/do-i-need-to-check-in-settings-org-eclipse-buildship-core-prefs-file/22457/2:
"This would happen if you have a checked in .project file with the buildship nature, but no checked in settings file. The choice is between checking in both or checking in neither and using the Gradle import wizard."
The easiest solution, using just the mouse is the following:
- Right click on the project then click Properties
- In the properties window go to the Project Natures and remove the Gradle Nature then click Apply and Close button
- Open again the same window and add Gradle Nature back, then click Apply and Close button
- Right Click on the project > Gradle > Refresh Gradle project
After each step: 1,2,3,4 let eclipse do its update job, do not push it quickly.
Other solution is to have the file saved somewhere and paste it again in the project or create from scratch manually, then do: Right Click on the project > Gradle > Refresh Gradle project.
Useful details:
File name: org.eclipse.buildship.core.prefs
File usual encoding: ISO_8859_1
File path: ./setting/org.eclipse.buildship.core.prefs
File content, one line: connection.project.dir = eclipse.preferences.version=1
score:11
I seriously searched for the solution, but only found workarounds. Alan47's solution created the file for me, but couldn't create the project properly in my case. So I just copied the file created and imported the project again in the default way:
File -> Import -> General -> Existing Project into Workspace
and pasted the file again at the directory
./.settings
The name of the file:
org.eclipse.buildship.core.prefs
The content of the file is only:
connection.project.dir=
eclipse.preferences.version=1
score:28
Another option is to:
- Move to your projects path (where gradle or gradlew is found)
- Unix:
sh gradlew cleaneclipse
Win:gradlew cleaneclipse
Requires the apply plugin: 'eclipse'
in your build.gradle
- Refresh your Project in eclipse.
- After that for Unix:
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.
Source: stackoverflow.com
Related Query
- How to fix "Missing Gradle project configuration file" issue in Buildship?
- Eclipse - How to fix error "No persistence.xml file found in project" JPA issue
- How to pass parameters to gradle in eclipse Buildship plugin while importing project
- How to make the runnable jar file for a maven eclipse project with hibernate configuration
- Eclipse launch configuration is missing when exporting a Spring boot project to a runnable jar file
- How to export project to JAR file as lib by Gradle Builder?
- How to Create project jar file through Eclipse for Spring Boot Gradle Project?
- How to compile gradle project to a jar file I can use in my Android application
- How to fix issue when I import Android project to Eclipse I get package name instead project name?
- Emulator error: This AVD's configuration is missing a kernel file
- The project description file (.project) for my project is missing
- How Do I Automatically Generate A .jar File In An Eclipse Java Project
- How to use Gradle to generate Eclipse and Intellij project files for Android projects
- How do I refresh project dependencies using Buildship in Eclipse?
- How to run single Java file from a project in Eclipse?
- How to add a Java Properties file to my Java Project in Eclipse
- How to create Jar file from Maven project in eclipse
- How do you compile an Android project into an .apk file in Eclipse without launching the emulator?
- Missing R.java file even though project cleaned
- How can I build an EAR file from a Dynamic Web Project in Eclipse?
- How to remove a file from an Eclipse project without deleting the file from the disk?
- Missing .classpath file in Eclipse project
- Eclipse: The project description file (.project) is missing
- How do I fix a "Prefs file removed in background /home/steven/.java/.userPrefs/prefs.xml" error?
- How to get back a file that was excluded from a build configuration in Eclipse CDT?
- How to Create a jar file from github project
- How to import a java project missing .project .settings .classpath files into eclipse
- How to get Eclipse to stop asking to create a module-info java file on new Java project creation?
- How to recover Java file from Eclipse Project that damaged by getting power off?
- How to store H2 database file into project directory
More Query from same tag
- What is the proper way to add an icon to a tab to a TabHost for Android?
- libGdx platform specific code
- java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/faces/FacesException
- Eclipse + PyDev debug message: [Invalid Frame]: Please select frame to connect the console
- How to use an IResourceChangeListener to detect a file rename and set the EditorPart name dynamically?
- Java, Eclipse, "Source Not Found"
- How to debug a Play java based application in eclipse IDE?
- Update Robolectric 2.4: Getting application tag error for library projects in eclipse
- Android: random number from range
- Deploying a WAR in Tomcat / Eclipse
- java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer
- How can I uninstall git on Eclipse?
- NDK_TOOLCHAIN is defined to the unsupported value
- Java query to solve
- Hide/show collapse/expand buttons
- Is there a way to export/import the individual syntax coloring from Eclipse to CLion?
- Class.class.getResourceAsStream returning null in eclipse but works in jar
- External program execution
- Loading images from jar files (Using Eclipse IDE)
- NoClassDefFoundError: /org/Hibernate/SessionFactory while executing maven .war
- Is it possible to make an array which reference to a picture
- Eclipse run function not working: unsupported major.minor version
- Accessing SVN server from remote Ubuntu machine
- Error When Adding XML Files to Android Project in Eclipse
- Control-M -> ENTER in Eclipse
- Eclipse launch config fails : What does ResourcesPlugin.getWorkspace().getRoot().getFile() evaluate to
- Skip test case execution in maven doesn't even compile Test cases
- Exclude regular expression in file search
- I got following error when I compile following program for xml to excel to conversion
- Making Http Get And Post Request