I'm encountering the following error while building my Flutter application in android:
Execution failed for task ':app:mergeReleaseResources'.
A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable 1
Resource compilation failed (Failed to compile values resource 2 file /path/to/your/project/build/app/intermediates/incremental/release/mergeReleaseResources/merged.dir/values/values.xml. Cause: java.lang.IllegalStateException: Can not extract resource from com.android.aaptcompiler.ParsedResource@63ee1dc2.) 3
I've tried the following troubleshooting steps, but the error persists:
- Clean and rebuild:
flutter clean
followed byflutter pub get
- Checked for duplicate resources: Reviewed
pubspec.yaml
andandroid/app/src/main/res
for conflicts. - Updated dependencies: Updated Flutter and all dependencies in
pubspec.yaml
to the latest versions. - Invalidated caches and restarted Android Studio.
Environment:
- Flutter version:
3.27.3
- Dart version:
3.6.1
- Android Studio version:
LadyBug Feature Drop 2024.2.2
- Operating System:
debian 12
Any help in resolving this issue would be appreciated.
Relevant screenshot
- error