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
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
Run Flutter Clean, then restart your machine.
That did it for me.
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
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.
This worked:
gradle.properties.org.gradle.jvmargs=-xmx4608m
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.