我有一项服务,可以跟踪对用户的交付状态。它有一个onCreate方法,如下所示: override fun onCreate() { job = Job()// We must always start foreground as otherwise we can get crashes
startForeground(Exception: android.app.RemoteServiceExc
context.startForegroundService(intent); context.startService(intent);但是当我想要停止这个服务时,我遇到了一个错误,它是:
android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground2.在onCreate()方法中使用startForeground(0, new N