I am failing to add dependencies to a gradle project (I am new)

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘gifProj’.

Could not resolve all artifacts for configuration ‘:classpath’.
Could not find org.springframework.boot:spring-gradle-plugin: 1.4.2.RELEASE.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/org/springframework/boot/spring-gradle-plugin/ 1.4.2.RELEASE/spring-gradle-plugin- 1.4.2.RELEASE.pom
- https://repo.maven.apache.org/maven2/org/springframework/boot/spring-gradle-plugin/ 1.4.2.RELEASE/spring-gradle-plugin- 1.4.2.RELEASE.jar
Required by:
project :

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s
Could not find org.springframework.boot:spring-gradle-plugin: 1.4.2.RELEASE.
Searched in the following locations:

Has it hit you yet? This is the clue:

If you paste the above URL into your browser, you get a 404. Because, as the error message tells you, nothing exists at that location.

However, something does exist at this location. So that means you need to replace spring-gradle-plugin with spring-boot-gradle-plugin in the dependencies{} block of your build.gradle.