Abdelrahman Tareq
Abdelrahman Tareq

Reputation: 2297

Execution failed for task ':app:compressDebugAssets'

Execution failed:

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

Upvotes: 5

Views: 26770

Answers (11)

Montana_Jim
Montana_Jim

Reputation: 31

I had this problem.

I was saving my folder to a mapped drive (i.e. my mapped Google drive e:\\Google Drive). It failed every time. I then moved the folder to the c: drive and everything worked fine.

So if you are saving it to a mapped drive, it is not going to work.

Upvotes: 3

Miguel Tomás
Miguel Tomás

Reputation: 1911

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

Upvotes: 0

lucamark
lucamark

Reputation: 11

I solved this issue by changing the settings in android/app/build.gradle file as follows:

minSdkVersion 28

Upvotes: 1

Bruno Santos
Bruno Santos

Reputation: 35

I was able to solve only by updating the Flutter

in your terminal run: "flutter upgrade"

Upvotes: 0

Jake Boomgaarden
Jake Boomgaarden

Reputation: 3586

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

Upvotes: 1

Hubbelbubbel
Hubbelbubbel

Reputation: 176

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

Upvotes: 3

A.A.
A.A.

Reputation: 251

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.

Upvotes: 0

illgoforit
illgoforit

Reputation: 459

For me what did the job was

./gradlew clean

Upvotes: 14

Enrique Velasquez
Enrique Velasquez

Reputation: 636

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

Upvotes: 4

Caro Pérez
Caro Pérez

Reputation: 538

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

Upvotes: 4

Abdelrahman Tareq
Abdelrahman Tareq

Reputation: 2297

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.

Upvotes: 4

Related Questions