RxJava 和 RxAndroid 之间的区别?

Difference between RxJava and RxAndroid?

为什么我们需要将 RxAndroid 与 RxJava 一起使用?它们与实际使用RxAndroid和RxJava的功能区别是什么?我找不到合适的答案。

RxAndroid 不会替代 rxjava。它是 Android 特定 rxjava 实用程序的小型库。例如,它使 Android 应用程序主线程可用作 rxjava 调度程序。

RxAndroid可以理解为RxJava的扩展,帮助您在Android平台上轻松使用它。请参阅 RxAndroid Github repository 上的说明:

Android specific bindings for RxJava 2.

This module adds the minimum classes to RxJava that make writing reactive components in Android applications easy and hassle-free. More specifically, it provides a Scheduler that schedules on the main thread or any given Looper.

请注意,当您使用 RxAndroid 时,您还应该使用最新的 RxJava 版本作为依赖项:

Because RxAndroid releases are few and far between, it is recommended you also explicitly depend on RxJava's latest version for bug fixes and new features.

RxAndroid 和 RxJava 的主要区别在于调度程序。调度程序在 RxAndroid 中特别可用,而不是在 RxJava 中可用,这有助于高效线程。

https://www.androidhive.info/RxJava/android-getting-started-with-reactive-programming/