Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/222.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 安卓-通知没有出现_Java_Android - Fatal编程技术网

Java 安卓-通知没有出现

Java 安卓-通知没有出现,java,android,Java,Android,我正在尝试使用AppCompat内部片段创建通知。 我什么也看不见 代码: 尝试将最后一位改为: NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); notificationManager.notify(0, builder.build()); NotificationManager notific

我正在尝试使用AppCompat内部片段创建通知。 我什么也看不见

代码:


尝试将最后一位改为:

NotificationManager notificationManager =
            (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);

notificationManager.notify(0, builder.build());
NotificationManager notificationManager =
            (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);

notificationManager.notify(0, builder.build());