Rx-Android library to import rx.android.plugins vs io.reactivex.android.plugins

my build.gradle

:

compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile "io.reactivex.rxjava2:rxjava:2.1.0"

      

When you use the exact libraries External Libraries

shows rxandroid-1.2.0

and rxandroid-2.0.1

in one my project, while the other shows only the last.

1.2.0

uses rx.android.schedulers.Scheduler;

which is compatible with rx.Observable

when used like this:

someRxObservable
  .subscribeOn(Schedulers.io())
  .observeOn(AndroidSchedulers.mainThread())
  .subscribe();

      

io.reactivex.Scheduler

used 2.0.1

is not, since it is not a subclass rx.Scheduler

. I'm not sure if this is a gradle dependency, waiting for both libraries to be loaded using the above gradle dependency. However, looking at the github source code for the latest version 2.0.1

it only displays the solution io.reactive

.

+3


source to share


1 answer


io.reactivex

is the new RxJava and the problem is that AndroidRx only works with the RxJava version. The fix was to use io.reactivex

across the board with their observers, planners and subscriptions.



0


source







All Articles