could not resolve all files for configuration ':compileClasspath'

 If you are getting "could not resolve all files for configuration ':compileClasspath'" for some dependency but the same is present in the maven repository and still the build file is not able to find the required dependency.

Steps:

1. Goto https://mvnrepository.com/

2. Search for the required dependency in the maven repository

3. Click on the "View All" hyperlink,  It will redirect to the actual repository URL

4. Add this URL in repositories in the build file.

e.g.

https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/

For this URL

repositories {
mavenCentral()
maven { url 'https://repo1.maven.org/maven2' }
}

Comments