报错提示:
Caused by: java.lang.IllegalArgumentException: Unable to create call adapter for io.reactivex.Observable<com.example.retrofitdemo.http.BaseResult<java.util.List<com.example.retrofitdemo.bean.BannerBean>>>
for method DemoApi.getBannerList
原因:
implementation 'com.squareup.retrofit2:adapter-rxjava:2.4.0' 不支持Rxjava2的转换
修改:
1.添加依赖:implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
2.retrofit添加
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())