how to solve Execution failed for task ‘:app:compileFlutterBuildDebug’

Error:

Execution failed for task ':app:processReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > Android resource linking failed
     ERROR:C:\Users\dharm\AndroidStudioProjects\mhn_app_doctor\build\app\intermediates\packaged_manifests\release\armeabi-v7a\AndroidManifest.xml:13: AAPT: error: resource mipmap/launcher_icon (aka cotocus.myhositalnowhospitaldoctor:mipmap/launcher_icon) not found.


* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 7s
Running Gradle task 'assembleRelease'...                           68.8s
Gradle task assembleRelease failed with exit code 1

Solution:

Something that work for me is: Delete your pubspec.lock, and press ‘Pub Get’ in your pubspec.yaml, it’ll regenerate pubspec.lock file again and should fix the problem.

Go to pubspec.yaml file, try doing Packages get | Pub get, and then build the project again.

I faced the same error and further, I tried:

  • flutter clean
  • flutter pub get in the terminal, and the issue was solved!
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x