While running a flutter app I am facing failure while gradle build. This issue was not there earlier and seems to have randomly occured. I am not sure what I must do to resolve it!
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.4.10.
Required by:
project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50
project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50
project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.3.50
project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.3.50
project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.3.50
project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.3.50
project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.3.50
project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-native-utils:1.3.50
project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-common:1.3.50
project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-jvm:1.3.50
project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-native-utils:1.3.50 > org.jetbrains.kotlin:kotlin-util-io:1.3.50
> Skipped due to earlier error
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.4.10.
Required by:
project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build.jetifier:jetifier-core:1.0.0-beta09
project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta09
> Skipped due to earlier error
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.4.10.
Required by:
project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-reflect:1.3.72
> Skipped due to earlier error
> Could not resolve javax.activation:javax.activation-api:1.2.0.
Required by:
project : > com.android.tools.build:gradle:4.1.0 > androidx.databinding:databinding-compiler-common:4.1.0 > org.glassfish.jaxb:jaxb-runtime:2.3.1
project : > com.android.tools.build:gradle:4.1.0 > androidx.databinding:databinding-compiler-common:4.1.0 > org.glassfish.jaxb:jaxb-runtime:2.3.1 > javax.xml.bind:jaxb-api:2.3.1
My project/build.gradle file looks like:
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.10'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Any help would be appreciated!