I am getting this error while I am building APK.
Cause 1: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while
If you've tried all the solutions above and still doesn't resolve your issue.
This might not seemed related, but here's my take on it.
Try removing this from your Gradle dependency, I've spend 2 hours of my time because of this roadblock.
implementation "com.squareup.retrofit2:adapter-rxjava2:2.3.0"
Working on android studio: 3.6.3 and gradle version:
classpath 'com.android.tools.build:gradle:3.6.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
Adding this line in
gradle.properties file
org.gradle.jvmargs=-Xmx512m
If any one having this issue in flutter after adding firebase storage. Do flutter clean and re run it, it will work
If you getting this error saying signing-config.json (Access denied) means just exit the android studio and just go to the desktop home and click on the android studio icon and give Run as Administrator, this will sort out the problem (or) you can delete the signing-config.json and re-run the program :)
I got this problem when I directly downloaded code files from GitHub but it was showing this error, but my colleague told me to use "Git bash here" and use the command to Gitclone it. After doing so it works fine.
In right side of android studio click gradle -> app -> build -> assemble. then android studio will start building, and print you a proper message of the issue.