observeOn(AndroidSchedulers.mainThread())报错
observeon(rx.Schedulers) in Observable cannot be applied to (io.reactivex.Schedulers)
引入无法识别
import rx.android.schedulers.AndroidSchedulers;
// implementation 'io.reactivex.rxjava2:rxjava:2.2.8' // implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
实际上是RxAndroid最高支持到1.2.1
https://mvnrepository.com/search?q=rxAndroid
解决方案:
implementation 'io.reactivex:rxandroid:1.2.1'