Error: Spring Application Cannot be resolved - gradle

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

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

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

Related

Intellij complaining about JDK location

First Image
Second Image
As I attached 2 images, I am having trouble running my spring boot gradle project written in groovy.
As soon as I open the project, intellij tries to build the project and it fails saying Gradle Sync failed.
Since it is complaining about java home in the jdk setting, I was trying to change the path as my intellij expects. but as soon as I change it, it tells me that it cannot find android sdk location. and I have no idea why it cares about android sdk. This project is about spring batch job using gradle and groovy.
I have been searching why it happens for days now and online is talking about ardroid studio solution. and those solution do not apply to my problem.
Can someone help me with this issue please?
Thank you in advance.
It looks like you are running Android Studio instead of IntelliJ IDEA.
The former doesn't support projects other than targeted for Android, so your project will not work there.
Make sure you run IntelliJ IDEA. You can get it at https://www.jetbrains.com/idea/download/index.html.

Intellij IDEA sstrange packges inside maven project

I am currently creating an empty spring boot project, and every time I make it these strange empty packages appears in the hierarchy of packages view scope . !
my package is com.dmlabs.hourly and I have nothing to do with those other empty packages
I don't know where to post this to got help, but for the dev community, can anyone solve this?

Intellij is unable to detect compile time errors

This is how it should beIt should be showing the highlighted line as error.I tried to configure the intellij platform plugin sdk for my maven project, but it did not fix rhe problem.
I checked the jdk path and it's pointing to the right place.
I am completely lost on how to resolve this and any help would be appreciated

kotlin-gradle plugin auto configure error

Module build.gradle code and file structure
Project build.gradle and buildscript code, and reported error
Just getting started with kotlin for android development here. After converting MainActivity to .kt, the kotlin-gradle plugin needs to be configured. IntelliJ offers to do it automatically, but fails with the error:
Cannot find build.gradle for module app.
I know I can configure it myself, but why cant intelliJ find the build.gradle files, they are in the project that was automatically generated by intelliJ itself. Do I have something configured incorrectly?
Any help or insight is appreciated, thank you in advance.
Seems that you are using Idea 2016.1. There is a bug in your tracker: https://youtrack.jetbrains.com/issue/KT-11593
Download the Maven repo from SDK manager, then try to reconfigure the kotlin again.

Springsourcetoolsuite sample project throwing maven dependency issues

I am new to STS and installed the latest version yesterday. Once installed I went to New->Spring Template Project->Simple Spring Batch Project and followed the instructions like giving a project name, specifying a package name and clicked finish.
The project is showing a lot of errors. I tried updating maven dependencies and clicked almost all logical options in maven. I even see that org.springframework is not resolved. I see "Failed to read artificat descriptor errors".
Can anybody guide me here? Since this is a sample project I expected it to compile and run straight away. Am i missing something?
My STS version is 2.7.2 and maven is 4.0
Unfortunately, some of the template projects are a bit out of date. I'd recommend posting on the STS forum for a bit of help on getting them working.
http://forum.springsource.org/forumdisplay.php?32-SpringSource-Tool-Suite

Resources