代码之家  ›  专栏  ›  技术社区  ›  TheJudge

RemoteServiceException:Statforeground的通知不正确-应用程序中没有通知

  •  1
  • TheJudge  · 技术社区  · 6 年前

    Fatal Exception: android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=null pri=-2 contentView=null vibrate=null sound=null defaults=0x0 flags=0x40 color=0x00000000 vis=PRIVATE)

    我知道,如果说我的通知没有定义频道是错误的,这是自Android 8或8.1以来所必需的(所有崩溃都在8+上),但问题是我没有在整个项目中使用任何通知。这可能是我使用的某个外部库的问题吗?如果是这样的话,为什么有些外部图书馆会做一些通知的事情…

    1 回复  |  直到 6 年前
        1
  •  2
  •   CommonsWare    6 年前

    Notification