首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >找不到io.reactivex.rxjava 2:rxandroid:2.2.20

找不到io.reactivex.rxjava 2:rxandroid:2.2.20
EN

Stack Overflow用户
提问于 2022-03-28 07:18:38
回答 1查看 712关注 0票数 0

这是我的项目,我正在尝试使用这个rxjava库。在开始时,我添加了所需的依赖项--它是同步的,没有任何错误--但是当我重新构建项目时,它没有工作。这是我的构建级:

代码语言:javascript
运行
复制
plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'androidx.navigation.safeargs.kotlin'
    id 'kotlin-kapt'
    id 'kotlin-android'
}

android {
    compileSdk 32

    defaultConfig {
        applicationId "com.cerentekin.countrylist"
        minSdk 23
        targetSdk 32
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    dataBinding {
        enabled = true
    }


    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }


}

dependencies {
    def lifeCycleExtensionVersion = '1.1.1'
    def supportVersion = '28.0.0'
    def retrofitVersion = '2.9.0'
    def glideVersion = '4.12.0'
    def rxJavaVersion = '2.2.20'
    def roomVersion = '2.4.2'
    def navVersion = '2.4.1'
    def preferencesVersion = '1.2.0'



    implementation 'androidx.core:core-ktx:1.7.0'
    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.5.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

    implementation "android.arch.lifecycle:extensions:$lifeCycleExtensionVersion"

    //noinspection GradleCompatible
    implementation "com.android.support:palette-v7:$supportVersion"
    //noinspection GradleCompatible
    implementation "com.android.support:design:$supportVersion"

    implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
    implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
    implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"

    implementation "com.github.bumptech.glide:glide:$glideVersion"

    implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
    implementation "io.reactivex.rxjava2:rxandroid:$rxJavaVersion"

    implementation "androidx.room:room-runtime:$roomVersion"
    implementation "androidx.legacy:legacy-support-v4:1.0.0"
    kapt "androidx.room:room-compiler:$roomVersion"
    implementation "androidx.room:room-ktx:$roomVersion"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2"

    implementation "androidx.navigation:navigation-fragment-ktx:$navVersion"
    implementation "androidx.navigation:navigation-ui-ktx:$navVersion"

    implementation "androidx.preference:preference:$preferencesVersion-ktx"

    implementation "com.google.android.material:material:1.5.0"

}

我第一次尝试了rxjava库,但是项目没有同步,“无法找到io.reactivex.rxjava 2:rxandroid:2.2.20”。这就是我的错。

EN

回答 1

Stack Overflow用户

发布于 2022-03-28 08:31:01

rxjavarxandroid使用相同的版本,这是两个不同的库

最新的rxandroid版本是2.1.1而不是2.2.20

您可以通过搜索maven储存库来检查上传到maven的最新版本的库。

例如,rxandroid2版本可以找到列出的这里

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71643686

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档