io.reactivex.Scheduler无法转换为rx.Scheduler
这个是版本差异的问题
这个是报错的版本
//rxandroid
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.x.y'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.x.y'
//build.gradle的依赖中加入,其中第二条不一定要使用gson,其他方式在官方的github上也有
// retrofit
implementation 'com.squareup.retrofit2:retrofit:2.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
正确的版本
implementation 'com.squareup.retrofit2:retrofit:2.0.1'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.0.1'
implementation 'com.squareup.retrofit2:converter-gson:2.0.1'
implementation 'com.google.code.gson:gson:2.6.2'
//rxjava
implementation 'io.reactivex:rxjava:1.1.2'
implementation 'io.reactivex:rxandroid:1.1.0'
//okhttp
implementation 'com.squareup.okhttp3:okhttp:3.2.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.2.0'