Raja Sardar
Raja Sardar

Reputation: 41

How to solve Flutter app build fail (Execution failed for task ':app:mergeDebugResources'.)?

Launching lib\main.dart on sdk gphone x86 in debug mode...

FAILURE: Build failed with an exception.

Multiple task action failures occurred: A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > Android resource compilation failed C:\Users\ASUS\Documents\bookingapp\Fook\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml: AAPT: error: file failed to compile.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > Android resource compilation failed C:\Users\ASUS\Documents\bookingapp\Fook\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-hi\values-hi.xml: AAPT: error: file failed to compile.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > Android resource compilation failed C:\Users\ASUS\Documents\bookingapp\Fook\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-de\values-de.xml: AAPT: error: file failed to compile.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > Android resource compilation failed C:\Users\ASUS\Documents\bookingapp\Fook\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-lo\values-lo.xml: AAPT: error: file failed to compile.

Upvotes: 0

Views: 2664

Answers (2)

Raja Sardar
Raja Sardar

Reputation: 41

finally found the problem it was my antivirus that was restricting AAPT to execute and make change in protected folder

  1. Disable File Safeguard
  2. Allow AAPT to Execute

Upvotes: 2

Dan Gerchcovich
Dan Gerchcovich

Reputation: 525

Try a clean build:

flutter clean

Then try running on another device:

flutter run -d DeviceName --release

If you do not need to debug, but you still need logs then a release configuration or a profile config should work for you --profile

Upvotes: 0

Related Questions