Christopher Mckenzie
Christopher Mckenzie

Reputation: 275

Cannot resolve method subscribe(rx.Scheduler)

So I have this problem with this udemy course I've been following. Everything works fine but I keep getting this error at this one line.

Observable<List<String>> userDetailsObservable = Observable.just(userDetails);

    return userDetailsObservable
          Error is here-->  .subscribe(Schedulers.io())

            //Check for user error.
            .map(new Func1<List<String>, Integer>() {

It keep getting told that it can't resolve the method so I cast it like it suggests but then I can't use the .map Anyone know whats wrong?

Upvotes: 0

Views: 537

Answers (1)

Anton Potapov
Anton Potapov

Reputation: 1275

Use subscribeOn(Schedulers.io()) instead of subscribe(Schedulers.io())

Upvotes: 4

Related Questions