skip to Main Content

I am new to flutter development, When i build my android project in release, the assets of the res folder are not included and the notification icons are missing, i have searched for an answer but couldnt find anything specific for differences between the two build configs,

Is there a place in android manifest or build gradle that needs to be configured for the release build to include the res assets? mipmap / drawable

thank you any help is appreciated!

enter image description here

here is the folder tree, pretty sure the debug is using the assets in mipmap and not drawable. there was an identicle folder called release with the same android manifest as profile however did not make a difference, thanks for the help

flutter version 3.0.4

dart version 2.17.5

enter image description here

the files are present in both mipmap and drawable folders

2

Answers


  1. Chosen as BEST ANSWER

    add this line to android manifest <meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/${notificationIconAsset}" />


  2. You ic_notification_studio.png should be under res/drawable-{dpi}.
    Flutter reads the given in AndroidInitializationSettings('ic_notification_studio') from drawable resources.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search