Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Spring Basics Creating Controllers and Views Adding Static Assets

hello Im having trouble with my gradle daemon, it keeps telling me gradle daemon is corrupted, help will be appreciated

ERROR: Unable to find method ''java.io.File org.gradle.api.tasks.SourceSetOutput.getClassesDir()''. Possible causes for this unexpected error include: Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. Stop Gradle build processes (requires restart)

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

this is my build:

group 'com.teamtreehouse' version '1.0-SNAPSHOT'

buildscript { repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.3.RELEASE") } }

apply plugin: 'java' apply plugin: 'idea' apply plugin: 'org.springframework.boot'

sourceCompatibility = 1.8 targetCompatibility = 1.8

repositories { mavenCentral() }

dependencies { compile("org.springframework.boot:spring-boot-starter-thymeleaf") compile("org.springframework.boot:spring-boot-devtools") testCompile("junit:junit") }

I have tried other builds and im still having an issue please any help would be greatly appreciated.

1 Answer

Hello Peter, I think your build is not correct. It was explained at the beginning of the course, I wonder how you manage to arrive till this point without any error../

The build.gradle I am using is:

plugins { id 'java' id 'org.springframework.boot' version '2.1.3.RELEASE' }

group 'com.giuseppesilvestro' version '1.0-SNAPSHOT'

repositories { mavenCentral() }

dependencies { compile 'org.springframework.boot:spring-boot-starter-thymeleaf:2.1.4.RELEASE' compile 'org.springframework.boot:spring-boot-starter-web:2.1.3.RELEASE'

}