I am getting the above error while calling the rest api. I am using both retrofit2 and RxJava.
public class ServiceFactory {
pu
Be sure to add implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0' or whatever version you are using to your dependencies, and then configure retrofit with that converter:
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(endpoint)
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.build();
Updated
RxJavaCallAdapterFactory was renamed to RxJava2CallAdapterFactory. Changed the snipped above.