ShrimpCrackers
ShrimpCrackers

Reputation: 4542

How do I get Android Studio to import the right (rxjava) library?

I have a git master branch and feature branch. The master branch was using rxjava3, but the feature branch uses rxjava 2. However, when I switch from the master to the feature branch, Android Studio does not recognize rxjava2 imports. The funny thing is that even with all the marked errors (cannot resolve symbol), it builds perfectly fine.

Android imports

If I ask Android Studio to import, it will try to import rxjava3 (import io.reactivex.rxjava3.*).

How do I get Android Studio to recognize the java2 import and not try to import rxjava3? My gradle build references rxjava2, not rxjava3 so I'm puzzled as to why it builds OK, but says there is a bunch of unresolved symbols. I am using Android Studio 4.1.1.

Upvotes: 1

Views: 442

Answers (1)

ShrimpCrackers
ShrimpCrackers

Reputation: 4542

Figured it out. Just lowered my version of rxjava2 in gradle file to a lower version, synced, and back to the latest version and synced again.

Upvotes: 1

Related Questions