Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to resolve RXJava dependency

I am trying to run following project : https://github.com/amitshekhariitbhu/RxJava2-Android-Samples

The depencies are:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.1.1'
    compile 'io.reactivex.rxjava2:rxjava:2.0.0'
    compile 'io.reactivex.rxjava2:rxandroid:2.0.0'
}

But I get following error.

Error:(26, 13) Failed to resolve: io.reactivex.rxjava2:rxandroid:2.0.0 Show in File
Show in Project Structure dialog

Am I doing something wrong ?

like image 664
drlobo Avatar asked Oct 18 '22 21:10

drlobo


1 Answers

I had the similar problem with RxKotlin, IDE had Gradle in Offline mode. (Settings-> Gradle -> Turn off offline mode).

Also, I suggest checking, that you have the correct version here.

It helped me to setup the RxKotlin, because there was only x.y.z. version.

Working gradle import:

compile 'io.reactivex:rxkotlin:2.0.0-RC1'
like image 109
mrek Avatar answered Oct 21 '22 07:10

mrek