E/Android: Awesome Notifications: Invalid notification (no valid small icon): Notification(channel=basic_channel shortcut=null contentView=null vibrate=null sound=null tick defaults=0x0 flags=0x11 color=0xff009688 vis=PRIVATE) (NotificationThread:58)
W/System.err(25254): me.carda.awesome_notifications.core.exceptions.AwesomeNotificationsException: Invalid notification (no valid small icon): Notification(channel=basic_channel shortcut=null contentView=null vibrate=null sound=null tick defaults=0x0 flags=0x11 color=0xff009688 vis=PRIVATE)
W/System.err(25254): at android.app.NotificationManager.fixNotification(NotificationManager.java:606)
W/System.err(25254): at android.app.NotificationManager.notifyAsUser(NotificationManager.java:585)
W/System.err(25254): at android.app.NotificationManager.notify(NotificationManager.java:534)
W/System.err(25254): at android.app.NotificationManager.notify(NotificationManager.java:510)
W/System.err(25254): at me.carda.awesome_notifications.core.managers.StatusBarManager.showNotificationOnStatusBar(StatusBarManager.java:86)
W/System.err(25254): at me.carda.awesome_notifications.core.threads.NotificationSender.showNotification(NotificationSender.java:260)
W/System.err(25254): at me.carda.awesome_notifications.core.threads.NotificationSender.doInBackground(NotificationSender.java:147)
W/System.err(25254): at me.carda.awesome_notifications.core.threads.NotificationSender.doInBackground(NotificationSender.java:32)
W/System.err(25254): at me.carda.awesome_notifications.core.threads.NotificationThread.runOnForegroundThread(NotificationThread.java:106)
W/System.err(25254): at me.carda.awesome_notifications.core.threads.NotificationThread.execute(NotificationThread.java:34)
W/System.err(25254): at me.carda.awesome_notifications.core.threads.NotificationSender.send(NotificationSender.java:101)
W/System.err(25254): at me.carda.awesome_notifications.core.AwesomeNotifications.createNotification(AwesomeNotifications.java:569)
W/System.err(25254): at me.carda.awesome_notifications.AwesomeNotificationsPlugin.channelMethodCreateNotification(AwesomeNotificationsPlugin.java:1274)
Asked
Active
Viewed 941 times
-1

griffins
- 7,079
- 4
- 29
- 54
-
add more details of how you init your notifications – griffins Oct 07 '22 at 05:22
-
Hello, welcome to SO! I would recommend reading through [SO tour page](https://stackoverflow.com/tour) and through SO help center on [how to ask good question](https://stackoverflow.com/help/how-to-ask). – PapaAtHome Oct 07 '22 at 12:14
2 Answers
0
Did you initialize your awesome notification plugin like the below-mentioned code?
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await AwesomeNotifications().initialize(
// set the icon to null if you want to use the default app icon
'resource://drawable/res_app_icon',
[
NotificationChannel(
channelGroupKey: 'basic_channel_group',
channelKey: 'basic_channel',
channelName: 'Basic notifications',
channelDescription: 'Notification channel for basic tests',
defaultColor: Color(0xFF9D50DD),
ledColor: Colors.white)
],
// Channel groups are only visual and are not required
channelGroups: [
NotificationChannelGroup(
channelGroupKey: 'basic_channel_group',
channelGroupName: 'Basic group')
],
debug: true
);
runApp(const MyApp());
}

Dharam Budh
- 515
- 2
- 9
0
remove the extension of the image from the image path like this:
'resource://drawable/res_notf_icon'

ibrahim Eltayfe
- 118
- 2
- 5