简体   繁体   English

val 通知 = NotificationCompat.Builder(context, channelID)

[英]val notification = NotificationCompat.Builder(context, channelID)

enter image description here在此处输入图像描述

i try to write this line, then it will shows an erreo what is the solution for that error pleas help my i am fully stuck on that.我试着写下这一行,然后它会显示一个错误,该错误的解决方案是什么,请帮助我完全坚持这一点。 enter image description here在此处输入图像描述

You cannot use an integer for channelId argument, try use a String or Notification.您不能将 integer 用于 channelId 参数,请尝试使用字符串或通知。

Reference: https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder#Builder(android.content.Context,java.lang.String)参考: https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder#Builder(android.content.Context,java.langString)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM