How to fix this error “A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade”

后端 未结 14 2012
死守一世寂寞
死守一世寂寞 2021-01-02 02:04

I can\'t run my app on AVD. I get this error.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionF

相关标签:
14条回答
  • 2021-01-02 02:53

    In my case problem arose due to gradle version upgradation from 6.2 all to 6.6 all in gradle wrapper. So i wiped data of avd and restarted it and then deleted .gradle folder in android/.gradle and then run yarn start --reset-cache and yarn android. Then it worked for me

    0 讨论(0)
  • 2021-01-02 02:54

    Run Flutter Clean, then restart your machine.

    That did it for me.

    0 讨论(0)
  • 2021-01-02 02:54

    My build.gradle (Project)

    buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
    }
    allprojects {
    repositories {
        google()
        jcenter()
    }
    }
    task clean(type: Delete) {
    delete rootProject.buildDir
    }
    

    My gradle-wrapper

    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
    
    0 讨论(0)
  • 2021-01-02 02:55

    I had the same issue in my flutter project and it happened suddenly when trying to build/debug. Nothing worked not even "File > Invalidate Caches/Restart..." Finally I did a "flutter clean" and "flutter packages get" and it worked.

    0 讨论(0)
  • 2021-01-02 02:55

    This worked:

    gradle.properties.org.gradle.jvmargs=-xmx4608m
    
    0 讨论(0)
  • 2021-01-02 02:55

    In my case i was mentioned android:src = "@drawable/screen" in launch_background.xml file.

    but, could not added image in drawable folder. Putting image screen.jpg in drawable folder fixed my issue.

    0 讨论(0)
提交回复
热议问题