E/AndroidRuntime: FATAL EXCEPTION: mainandroid.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{9c39969intent.getStringExtra(label));
if (B
Fatal Exception: android.app.RemoteServiceExceptionContext.startForegroundService() did not then callService.startForeground() android.app.ActivityThread$H.handleMessage (ActivityThread.java:1874) if (Bu
我有时会遇到这样的例外:
然后,Context.startForegroundService()没有调用Service.startForeground() android.app.ActivityThread.main有趣的是,我不知道何时或何处调用startForegroundService的堆栈跟踪。Fatal Exception: android.app.RemoteServiceException: Context.startForegroundService() did no
Fatal Exception: android.app.RemoteServiceException: Context.startForegroundService() did not then callService.startForeground()
根据代码,它不应该崩溃,因为我从onCreate发布前台服务通知,并在服务onDestroy上取消该通知。我猜想,在某个时候,android系统可能会杀死服务,因为通知被自动取消,服务被重新启动,这一次onCreate可能不会被调用。但另一方面,我也不确定这一次(系统杀
我启动了一个前台服务,它适用于Android8及更低版本;但是,它提供了适用于Android9和Android10的RemoteServiceException try {
//prevent 5 seconds Context.startForegroundService() did not then call Service.startForeground</em
我的应用程序将在MainActivity的onCreate中调用startForegroundService(intent)。Exception android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground有没有可能在5秒内没有调用onCreate或startCommand?如果是这样,我们应该如何调用startForegroun
我在我的安卓服务中使用Context.startForegroundService() did not then call Service.startForeground(),但我不知道为什么会发生这种情况在从我的UI执行onStop时,或者在从UI调用onPause,然后从UI调用onStop (镜像清除通知所需的操作)时,只从通知中执行错误。关于这个错误,我所能发现的是,它应该发生在调用startForegroundService时,但不要在5秒内调用startForeground