NotificationCompat.Builder doesn't accept 2nd argument

后端 未结 2 980
执念已碎
执念已碎 2020-12-02 02:56

For some reason my NotificationCompat.Builder will not accept 2nd argument and I have no idea how to fix it. I saw some other answers but mostly the problem was

2条回答
  •  北荒
    北荒 (楼主)
    2020-12-02 03:21

    Please make sure that you are including the correct version of the NotificationCompat library: import android.support.v4.app.NotificationCompat;. Here is the official guide on Notification Channels, which are a new feature as of Android O: https://developer.android.com/training/notify-user/channels.

提交回复
热议问题