|Gradle Can't Find Obviously There Projects [message #1755687]
||Mon, 06 March 2017 19:45
| Brandon Lewis
Registered: May 2012
I've spent almost a full day copying strings from settings.gradle files trying to understand why Gradle can't see an obviously there Project.
Is there anyway other than cursing at my computer to debug why Gradle can't see Projects that are obviously there?
I have about 5 Projects I'm working with:
The build.gradle and settings.gradle files are working fine for Project3,4, and5,: they are all independent and have dependencies resolved from jcenter.
Project2 is interesting, because it depends upon Project4 and Project5. The compile works. I have proven I understand the basics of setting up multi-project settings.gradle files.
However, for Project1, when I setup its settings.gradle file like this:
project(':Project2').projectDir = new File(settingsDir, '../Project2')
Gradle refuses to find that Project2. No amounting of refreshing the Gradle Project, quitting restarting Eclipse, copying Strings and putting them side by side 1,000 times making sure I've spelled the directory correctly, NOTHING will ask Gradle nicely to find Project2 -> EVEN THOUGH PROJECT2 EXISTS AND COMPILES.
Furthermore, the Gradle Tasks View seems like I have to close, re-open it often as it often does not honor the Refresh Gradle Project.
I am going absolutely crazy.
Gradle's error message is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':Project2'.
Caused by: org.gradle.api.GradleScriptException: A problem occurred evaluating project ':Project2'.
Caused by: org.gradle.api.UnknownProjectException: Project with path ':Project4' could not be found in project ':Project2'.
(This one in particular feels like a complete lie as I'm able to build, with Gradle, Project2 and he can easily find Project4).
Root cause: org.gradle.api.GradleScriptException: A problem occurred evaluating project ':Project2'.
[Updated on: Mon, 06 March 2017 19:46]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01749 seconds