创建Notification有两种方式:
1、 Notification.Builder builder = new Notification.Builder(this);
Notification notification = builder.build();
2、NotificationCompat.Builder builder = new NotificationCompat.Builder( getApplicationContext(),"11");
Notification notification = builder.build();
用第一种方式不会显示时间,第二种显示时间,上述代码是android.support环境下,androidx下面使用导入androidx的包androidx.core.app就行