Cannot resolve symbol AndroidSchedulers

syfy :

I'm using version 2.0.0 of RxJava, and it seems like I have no access to AndroidSchedulers. I'm unable to get access to mainthread through RxJava

Maksim Ostrovidov :

AndroidSchedulers class is a part of RxAndroid library. Add it to your app's build.gradle:

before Gradle v3.0:

compile 'io.reactivex.rxjava2:rxandroid:2.0.1'

since Gradle v3.0:

implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=447132&siteId=1