Android retrofit+rxjava error solution

错误:Unable to create call adapter for rx.Observable<com.tecocity.mykotlinxietwo.MainBean>

It means that I forgot to add the rxjava adapter in the network encapsulation access method, as shown below:
Insert image description here
You need to add a blue line of code;
because my interface returns the observer data as shown below:
Insert image description here
I hope it can help everyone.

Guess you like

Origin blog.csdn.net/mawlAndroid/article/details/125170891