java.lang.ClassNotFoundException: Didn't find class "android.arch.lifecycle.LifecycleObserver"


I started getting this error recently and I am not sure why when using the mapbox plugin on android:

java.lang.ClassNotFoundException: Didn’t find class “android.arch.lifecycle.LifecycleObserver”

More info here:

Any ideas what could be causing this?

Thank You.


Have you tried adding a dependency to the andrid.arch.lifecycle Android library?


I didn’t but I will try that tonight. Thank you for the suggestion.


I adde the following to app.gradle and it worked.

compile ('android.arch.lifecycle:livedata:1.1.0') {
        force = true;
    compile ('android.arch.lifecycle:viewmodel:1.1.0') {
        force = true;

Thank you very much.