Vidhi
Vidhi

Reputation: 35

Error: Spring Application Cannot be resolved

I trying to create Gradle project to use with spring Boot in Eclipse in my organization network. But I am not able to create it It's giving me an error

"Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
SpringApplication cannot be resolved at com.vidya.BootGradleApplication.main(BootGradleApplication.java:11)" 

Please help me to solve this problem. I have attached the Image for more understanding

1

Upvotes: 2

Views: 9727

Answers (2)

W Kenny
W Kenny

Reputation: 2069

I am using Vscode and this problem wasted me for an hour.

The way to solve this bug in Vscode is just to restart Vscode so that it can update the project

Upvotes: 2

Matt Hahn
Matt Hahn

Reputation: 404

For anyone else with this problem, here's something important that may help you.

"Eclipse does not automatically update the classpath, if the build.gradle file is updated. Select Gradle ▸ Refresh Gradle Project from the context menu of the project or from your build.gradle file for that"

From http://www.vogella.com/tutorials/EclipseGradle/article.html#updating-classpath-with-the-latest-changes-in-the-build-file

Upvotes: 3

Related Questions