Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed
I am also facing this issue. I have tried all the above answers but not working. I have checked these are the questions and their answers. Question 1, Question 2, Question 3 and I have tried to install Windows Universal C Runtime library also.
I have tried to set the Gradle plugin version 3.5.0 and Gradle version 5.1.0 or 5.6.1 but then also not working. I have checked this google tracker issue also then also not got the answer.
After spending almost 6 to 7 hours I got the solution and it is below:
Project level build.gradle file:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
This is gradle-wrapper.property file:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
I hope someone will get help.