skip to Main Content

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

2

Answers


  1. 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'
    }
    
    Login or Signup to reply.
  2. 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
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search