Android - java.lang.IllegalArgumentException: contentIntent required error caused by notification?

后端 未结 4 2252
北荒
北荒 2021-02-19 00:52

I have a service running that updates a notification in the notification bar when it recieves a message saying it has to be changed.

However I get the following error so

4条回答
  •  说谎
    说谎 (楼主)
    2021-02-19 01:13

    In my case, I had an example code to do, with a single Notification to create, and I also got "contentIntent required" error - google brought me to this thread :D

    the source of this problem were quotations that I copied from an example code and pasted it in eclipse project. When I deleted " " and typed them back and problem was solved. Maybe this helps someone.

    These were quotations source of error: nb.setContentTitle("My first notification!"); nb.setContentText("Hello");

提交回复
热议问题