React native android build fails with Execution failed for task ':app:lintVitalRelease'. Could not download groovy-all-2..4.15.jar

Viewed 2147

Android build using AWS CodeBuild fails with following error:

Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all files for configuration ':app:lintClassPath'.
   > Could not download groovy-all-2.4.15.jar (org.codehaus.groovy:groovy-all:2.4.15)
      > Could not get resource 'https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
         > Could not GET 'https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
            > Connection reset

The build works fine on my local machine. The above mentioned error occurs only while trying to build the apk using AWS CodeBuild.

If this has something to do with jcenter shutdown, how to fix it?

1 Answers

Open your build.gradle file and add the code below under android:

android {

lintOptions { 
  checkReleaseBuilds false 
}

For more details Here

Related