实际写的时候报错

来源:2-1 channelApi的介绍

慕数据9115892

2018-08-03 13:50

 报如下错误:No Channel found for pkg=com.example.mynotification, channelId=通知渠道ID, id=1, tag=null, opPkg=com.example.mynotification, callingUid=10085, userId=0, incomingUserId=0, notificationUid=10085, notification=Notification(channel=通知渠道ID pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x10 color=0x00000000 vis=PRIVATE)

尝试了网上的解决办法,依然报错

写回答 关注

1回答

  • 三少爷的鞋
    2018-08-11 21:50:11
    builder = new Notification.Builder(this);
    builder.setAutoCancel(true)
        .setChannelId("channel_id")
        .setContentTitle("下载中。。。。。")
        .setContentText("明天是周日,不上班")
        .setSmallIcon(R.mipmap.ic_launcher);

    builder 写全试试

Android O(8.0)通知栏解决方案

本课程主要介绍Android 8.0 ChannelNotification的管理。

6669 学习 · 4 问题

查看课程

相似问题