Could not resolve all files for configuration ':app:debugRuntimeClasspath'

Viewed 861

I am trying to build the flutter application. It was working fine before but suddenly this error is being shown:

Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.github.yalantis:ucrop:2.2.6.
     Required by:
         project :app > project :image_cropper
      > Could not resolve com.github.yalantis:ucrop:2.2.6.
         > Could not get resource 'https://www.jitpack.io/com/github/yalantis/ucrop/2.2.6/ucrop-2.2.6.pom'.
            > Could not HEAD 'https://www.jitpack.io/com/github/yalantis/ucrop/2.2.6/ucrop-2.2.6.pom'.
               > Connect to www.jitpack.io:443 [www.jitpack.io/149.56.28.39] failed: Read timed out

Following is my build.gradle file:

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        jcenter()
        maven { url 'https://www.jitpack.io' }
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

I tried all the answers specified in github and stackoverflow. none of them worked. Please help me

0 Answers
Related