When I was trying to upgrade my Android Studio to 3.4, the update does not go smoothly rather, some dependencies break. In my case, the RxJava/RxKotlin dependencies are breaking without giving any clue. Even that is happening randomly as I have RxJava/RxKotlin Code in each of my 4 modules but the dependency is failing in only one module.
What I tried :
- Invalidate Cache and restart.
- Delete /build *module/build/ *module/.gradle/ & .gradle/
- Clean Project
Try find answers on the internet and these are the closest but does not solve the problem. (They did not recommend to upgrade to 3.4)
i) Unresolved reference: Observable in Android Studio 3.4 Explains the problem I have but the thread is moving to either not upgrading the Gradle (Which is last option for me) or making sure RxJava that is being used in the project or any of its library is 2.2.8). For that reason I tried explicitly adding RxJava 2.2.8 (I was not previously as I was getting it inside RxKotlin) and wrote a resolutionStrategy to force Android studio to use RxJava 2.2.8 like this in that particular module i.e. domain, but did not solve the issue :
configurations.all { resolutionStrategy.force 'io.reactivex.rxjava2:rxjava:2.2.8' }
ii) RxKotlin is not resolved properly after updating Gradle to 3.4.0 which does not yet give any solution. And I am even suspicious if it's the issue with RxJava/RxKotlin or the Gradle plugin itself. Or even if it's the case with RxKotlin or any other libraries too.
Edit: My dependencies in domain module looks like this :
dependencies {
implementation Deps.kotlinStdLib
implementation Deps.rxKotlin
implementation Deps.dagger
implementation Deps.timber
implementation Deps.mobiusCore
implementation Deps.mapboxGeoJSONCore
}