Skip to content

java.lang.IllegalArgumentException: Invalid notification (no valid small icon) #3

@jamesholcomb

Description

@jamesholcomb

Any ideas why the default ic_launcher.png icon is not resolving? The file exists in the /res/mipmap-* folders (/src/debug and src/main). When receiving notifications in the background, the ic_launcher icon displays correctly in the status bar and on the notification bubble.

buildscript {
    ext {
        googlePlayServicesVersion = "16.+"
        buildToolsVersion = "29.0.2"
        minSdkVersion = 16
        compileSdkVersion = 29
        targetSdkVersion = 29
        supportLibVersion = "28.0.0"
        androidMapsUtilsVersion = "0.5+"
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:3.5.3")
        classpath("com.google.gms:google-services:4.3.3")
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
PushNotificationAndroid.notify({
      title: "title",
      body: "body",
      click_action: "fcm.ACTION.HELLO"
    });
    <application
      android:name=".MainApplication"
      android:allowBackup="true"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:theme="@style/AppTheme">
09-18 10:12:16.902 24241 24373 E NotificationCenterH: failed to send local notification
09-18 10:12:16.902 24241 24373 E NotificationCenterH: java.lang.IllegalArgumentException: Invalid notification (no valid small icon): Notification(channel=null pri=1 contentView=null vibrate=[0,300] sound=content://settings/system/notification_sound defaults=0x0 flags=0x10 color=0x00000000 category=call vis=PRIVATE)
09-18 10:12:16.902 24241 24373 E NotificationCenterH: 	at android.app.NotificationManager.notifyAsUser(NotificationManager.java:310)

Release 1.3.0
React Native 0.63.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions