IllegalArgumentException: Could not locate call adapter for rx.Observable RxJava, Retrofit2

后端 未结 5 1362
野的像风
野的像风 2020-12-15 03:39

I am getting the above error while calling the rest api. I am using both retrofit2 and RxJava.

ServiceFactory.java

public class ServiceFactory {
pu         


        
5条回答
  •  眼角桃花
    2020-12-15 04:00

    In my case, it was enough to replace

    .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
    

    with

    .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
    

提交回复
热议问题