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!
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
the files are present in both mipmap and drawable folders
2
Answers
add this line to android manifest
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/${notificationIconAsset}" />
You
ic_notification_studio.png
should be underres/drawable-{dpi}
.Flutter reads the given in
AndroidInitializationSettings('ic_notification_studio')
from drawable resources.