Android-Retrofit&Rxjava的结合Mar 15, 2017添加依赖12compile 'com.squareup.retrofit:adapter-rxjava:2.0.0-beta1'compile 'io.reactivex:rxandroid:1.0.1' 添加AddCallAdapterFactory12345Retrofit retrofit = new Retrofit.Builder() .baseUrl("http://api.stay4it.com/") .addConverterFactory(GsonConverterFactory.create()) .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) .build(); 返回Observable123456public interface APIService { @POST("list") Call<DessertItemCollectionDao> loadDessertList(); @POST("list") Observable<DessertItemCollectionDao> loadDessertListRx();}