I'm getting this error while building my program
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
I tried what was on the internet about the error but it didn't work
CodePudding user response:
Solution-1
- Try invalidate Caches & Restart
Solution-2
In gradle.app file, add these two lines, if didn't and rebuild the project
defaultConfig {
multiDexEnabled true
}
And
dependencies {
implementation 'com.android.support:multidex:1.0.3'
}
CodePudding user response:
Can't really figure out the actual problem by this short piece of the stacktrace but a similair problem was answered here: Old stack overflow question
The guy fixed it by increasing the jvm args size add this in your gradle.properties
org.gradle.jvmargs=-Xmx4608m