Execution failed for task ':app:compressDebugAssets'

Viewed 14176

Execution failed:

task ':app:compressDebugAssets'.> A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction > \app\build\intermediates\merged_assets\debug\out

9 Answers

For me what did the job was

./gradlew clean

I found a temporary solution in downgrading my Android Studio version to 4.0.2. Additionally, I changed the Android Gradle plugin version to 4.0.2 and the Gradle version to 6.1.1 which I had installed before. You can do this under File -> Project Structure -> Project.

deleted .gradle .idea

having your project in this folder the original of the program AndroidStudioProjects

open Project File > Invalidate Caches /Resetart..

Android studio will restart File > Sync Projet With Gradle Files

end..

my current project Android Gradle Pluglin version 4.3.3 Gradle version 6.7.1

In my case, I was able to solve the problem in AndoidStudio as follows: Tools -> Flutter -> Flutter Clean

This happened to me because I had too large a file inside my assets folder. In my case it was a .db file

I had the same problem when building my project for the first time using android-studio arm version, what fixed it a simple ./gradlew clean as illgoforit mentioned above.

Well, solutions to this error, sound and look a bit like crystal ball sight seeing!!!!

So here's mine:

Was able to solve it by running delete folders

/app/build
/.ideia
/.gradle

moved the project to a NFFS partition on windows.

invalidated caches and restarted Android Studio and then rebuild the project

Running flutter clean in a terminal window from the project root directory fixed the issue for me

I was able to solve only by updating the Flutter

in your terminal run: "flutter upgrade"

Related