Priyanka Singhal
Priyanka Singhal

Reputation: 261

android facing crash report for firebase notifications in 8.0 and 8.1 only

This is the crash i am facing. Please tell possible solution

Exception is

java.lang.IllegalStateException

android.app.ContextImpl.startServiceCommon

Report is

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)

However, I feel the version of firebase i am using is lower but it is also not allowing me to add higher version in 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'
}

Upvotes: 0

Views: 837

Answers (1)

shmakova
shmakova

Reputation: 6426

You should update your firebase library to the latest one (now it is 11.8.0), because of Android O background limitations (docs)

Upvotes: 3

Related Questions