Java 对象在notify()之前未被线程锁定?
我正在尝试解决问题,但失败,我看到其他堆栈溢出的问题,但未能解决 如何解决以下问题 notificationBuilder.notify(notiID,notificationBuilder.build())Java 对象在notify()之前未被线程锁定?,java,android,Java,Android,我正在尝试解决问题,但失败,我看到其他堆栈溢出的问题,但未能解决 如何解决以下问题 notificationBuilder.notify(notiID,notificationBuilder.build()) }您没有使用正确的notify() 改变 notificationBuilder.notify(notiID, notificationBuilder.build()); 到 Object#notify()是Java中用于处理多线程的方法。这不是你想要的。请以文本形式发布代码我编辑了这篇
}您没有使用正确的
notify()
改变
notificationBuilder.notify(notiID, notificationBuilder.build());
到
Object#notify()
是Java中用于处理多线程的方法。这不是你想要的。请以文本形式发布代码我编辑了这篇文章。
notificationBuilder.notify(notiID, notificationBuilder.build());
notificationManager.notify(notiID, notificationBuilder.build());