1

在 1.4 更新之前,您可以只写:

.observeOn(AndroidSchedulers.mainThread()) 

并导入 rx.android.schedulers.AndroidSchedulers;但现在我无法完成这项工作。

这是移动/删除还是现在是否存在另一个实现以获得类似的效果?

4

1 回答 1

0

The library no longer relies on RxAndroid.

Make sure that you've put compile 'io.reactivex:rxandroid:XXX' in your build.gradle, if you want to use it's classes in your code.

It's not a good pracitse to rely on tranitive dependencies, you should declare them on your own.

于 2017-09-14T09:17:56.080 回答