Caused by java.lang.IllegalArgumentException: No such service ComponentInfo{xxx/com.google.firebase.messaging.MessageForwardingService}
at android.os.Parcel.createExceptionOrNull(Parcel.java:2377)
at android.os.Parcel.createException(Parcel.java:2357)
at android.os.Parcel.readException(Parcel.java:2340)
at android.os.Parcel.readException(Parcel.java:2282)
at android.app.job.IJobScheduler$Stub$Proxy.enqueue(IJobScheduler.java:342)
at android.app.JobSchedulerImpl.enqueue(JobSchedulerImpl.java:56)
AndroidManifest.xml 增加配置:
android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true"
<service android:name="com.google.firebase.messaging.MessageForwardingService" android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true"/>
<service
android:name="net.test.xxx.CocFirebaseMessagingService"
android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>