greymatter
greymatter

Reputation: 990

Unable to import SyncOnSubscribe with RxJava2

I am trying to use SyncOnSubscribe, but it is apparently not included in

// https://mvnrepository.com/artifact/io.reactivex.rxjava2/rxjava 
compile group: 'io.reactivex.rxjava2', name: 'rxjava', version: '2.2.16'

I am starting to suspect that it was dropped between RxJava1 and RxJava2. If that is the case, what is the RxJava2 alternative? If it part of RxJava2, what do I need to include in build.gradle to be able to import it?

Upvotes: 1

Views: 141

Answers (1)

greymatter
greymatter

Reputation: 990

SyncOnSubscribe is RxJava 1 only. For RxJava 2, use Flowable.generate or fromCallable.

Upvotes: 1

Related Questions