android – Updating Firebase causes RxBLE crash-ThrowExceptions

Exception or error:

Okay, so I’m having some very odd behaviour that doesn’t make much sense in my app.

My app uses BLE and I have a static class which I initialize on app launch, this typically works with no issue.

Today I made a single change in my app which was to update this:

    implementation ''
    implementation ''

To this:

    implementation ''
    implementation ''

And after making this minor version update to firebase core, my app now immediately crashes on launch with the following error:

2020-02-13 09:44:57.530 20760-20760/ E/AndroidRuntime: FATAL EXCEPTION: main
    Process:, PID: 20760
    java.lang.NoSuchMethodError: No static method injectMembers(Ldagger/MembersInjector;Ljava/lang/Object;)Ljava/lang/Object; in class Ldagger/internal/MembersInjectors; or its super classes (declaration of 'dagger.internal.MembersInjectors' appears in /data/app/!classes3.dex)
        at com.polidea.rxandroidble.RxBleAdapterStateObservable_Factory.get(
        at com.polidea.rxandroidble.RxBleAdapterStateObservable_Factory.get(
        at com.polidea.rxandroidble.RxBleClientImpl_Factory.get(
        at com.polidea.rxandroidble.RxBleClientImpl_Factory.get(
        at dagger.internal.DoubleCheck.get(
        at com.polidea.rxandroidble.DaggerClientComponent.rxBleClient(
        at com.polidea.rxandroidble.RxBleClient.create(
        at<init>(  // These are the only
        at    // lines in my code which
        at            // are totally unrealted to firebase
        at android.os.Handler.dispatchMessage(
        at android.os.Looper.loop(
        at java.lang.reflect.Method.invoke(Native Method)
2020-02-13 09:44:57.586 2989-3111/? E/NetworkController.MobileSignalController(2): showVoteIcon=false

Note: My app does not use dagger at all, though the RxBLE library might…

If I revert the firebase update the app builds and runs with no issue, so for now I’ll just stick to using firebase-messaging:20.0.0 and firebase-core:17.2.1, but does anyone have any clue why this might be happening?

This is the only line of code required to make the crash happen:


Here is a test repo that you can reproduce the crash in:

Note that there are 2 commits, in the first commit the app has updated firebase and crashes, the second commit it does not crash and uses the older firebase version.

How to solve:

So the issue was the version of the rxandroidble library was incompatible with the new firebase messaging.

When I updated from

implementation 'com.polidea.rxandroidble:rxandroidble:1.4.3'


implementation 'com.polidea.rxandroidble:rxandroidble:1.7.1'

the crash stopped.

Leave a Reply

Your email address will not be published. Required fields are marked *