Android 面临崩溃报告,仅适用于 8.0 和 8.1 中的 Firebase 通知



这是我面临的崩溃。请告诉可能的解决方案

例外情况是

java.lang.IllegalStateException
android.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

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'
}

由于 Android O 背景限制(文档(,您应该将 Firebase 库更新到最新版本(现在是 11.8.0(

相关内容

  • 没有找到相关文章

最新更新