android面临崩溃报告仅适用于8.0和8.1中的firebase通知

家资是何物,积帙列梁梠。这篇文章主要讲述android面临崩溃报告仅适用于8.0和8.1中的firebase通知相关的知识,希望能为你提供帮助。
这是我面临的崩溃。请说出可能的解决方案
【android面临崩溃报告仅适用于8.0和8.1中的firebase通知】例外是

java.lang.IllegalStateExceptionandroid.app.ContextImpl.startServiceCommon

报告是
java.lang.RuntimeException: at android.app.ActivityThread.handleReceiver (ActivityThread.java:3194) at android.app.ActivityThread.-wrap17 (Unknown Source) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1672) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:164) at android.app.ActivityThread.main (ActivityThread.java:6494) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:807) Caused by: java.lang.IllegalStateException: at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1521) at android.app.ContextImpl.startService (ContextImpl.java:1477) at android.content.ContextWrapper.startService (ContextWrapper.java:650) at android.content.ContextWrapper.startService (ContextWrapper.java:650) at android.support.v4.content.WakefulBroadcastReceiver.startWakefulService (WakefulBroadcastReceiver.java:91) at com.google.firebase.iid.FirebaseInstanceIdInternalReceiver.zzj (Unknown Source:11) at com.google.firebase.iid.FirebaseInstanceIdInternalReceiver.zzb (Unknown Source:72) at com.google.firebase.iid.FirebaseInstanceIdInternalReceiver.onReceive (Unknown Source:25) at android.app.ActivityThread.handleReceiver (ActivityThread.java:3187)

但是,我觉得我使用的firebase版本较低,但它也不允许我在build.gradle()中添加更高版本。
Build.gradle依赖项
dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' exclude group: 'com.google.code.findbugs' }) compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2' compile 'org.apache.commons:commons-lang3:3.5' compile 'com.android.support:appcompat-v7:26.+' compile 'com.android.support:cardview-v7:26.+' compile 'com.android.support:recyclerview-v7:26.+' compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.theartofdev.edmodo:android-image-cropper:2.3.+' compile 'com.android.support:design:26.+' compile 'com.wdullaer:swipeactionadapter:2.0.0' compile 'me.biubiubiu.justifytext:library:1.1' compile 'jp.wasabeef:blurry:2.1.1' compile 'com.intuit.sdp:sdp-android:1.0.4' testCompile 'junit:junit:4.12' compile 'com.android.support:multidex:1.0.1' compile 'com.github.kulik:android-jaxb:0.3' compile 'com.google.firebase:firebase-messaging:9.2.1' //compile files('libs/jaxb-api-2.2.4.jar') compile files('libs/dnd-4.2-SNAPSHOT-jar-with-dependencies.jar') compile 'org.jsoup:jsoup:1.10.2' }

答案您应该将firebase库更新为最新版本(现在是11.8.0),因为Android O背景限制(docs)

    推荐阅读