Failed resolution of: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;

Viewed 2271

I'm using RxJava with Retrofit on the newest preview of AndroidStudio. My project has java 1.8 suport enabled like this:

compileOptions {
    targetCompatibility 1.8
    sourceCompatibility 1.8
}

But when the code is compiled and run I'm getting this error, as soon as the request is made, even if I have the onError handler:

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;
at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:281)
at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:58)
at io.reactivex.Observable.subscribe(Observable.java:10179)
at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:34)
at io.reactivex.Observable.subscribe(Observable.java:10179)
at io.reactivex.internal.operators.flowable.FlowableFromObservable.subscribeActual(FlowableFromObservable.java:31)
at io.reactivex.Flowable.subscribe(Flowable.java:12218)
at io.reactivex.internal.operators.flowable.FlowableOnBackpressureLatest.subscribeActual(FlowableOnBackpressureLatest.java:31)
at io.reactivex.Flowable.subscribe(Flowable.java:12218)

This happens even if I use Maybe, Single or Observable. How can this issue be resolved?

1 Answers
Related