无法解析':feature @ debugFeature/compileClasspath'的依赖项:无法解析androidx.annotation:annotation:1.0.0-rc01 [英] Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.annotation:annotation:1.0.0-rc01

查看:1100
本文介绍了无法解析':feature @ debugFeature/compileClasspath'的依赖项:无法解析androidx.annotation:annotation:1.0.0-rc01的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将Android Studio更新到3.3 Canary 10(从以前的Canary版本开始)之后,我开始出现Gradle同步问题:

After updating Android Studio to 3.3 Canary 10 (from the previous Canary) I've started to get Gradle sync issues:

ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.annotation:annotation:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.legacy:legacy-support-core-utils:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.core:core:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.collection:collection:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.versionedparcelable:versionedparcelable:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.documentfile:documentfile:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.loader:loader:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.localbroadcastmanager:localbroadcastmanager:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.print:print:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve io.reactivex.rxjava2:rxjava:2.0.6.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve org.reactivestreams:reactive-streams:1.0.0.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve io.reactivex.rxjava2:rxjava:2.2.0.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.legacy:legacy-support-core-utils:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve io.reactivex.rxjava2:rxjava:2.0.6.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.annotation:annotation:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.core:core:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.collection:collection:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.legacy:legacy-support-core-utils:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve org.reactivestreams:reactive-streams:1.0.2.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.annotation:annotation:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.documentfile:documentfile:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.loader:loader:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.localbroadcastmanager:localbroadcastmanager:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.print:print:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.versionedparcelable:versionedparcelable:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.core:core:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.annotation:annotation:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.legacy:legacy-support-core-utils:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.core:core:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.collection:collection:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.versionedparcelable:versionedparcelable:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.documentfile:documentfile:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.loader:loader:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.localbroadcastmanager:localbroadcastmanager:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.print:print:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve io.reactivex.rxjava2:rxjava:2.0.6.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve org.reactivestreams:reactive-streams:1.0.0.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve io.reactivex.rxjava2:rxjava:2.2.0.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.legacy:legacy-support-core-utils:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve io.reactivex.rxjava2:rxjava:2.0.6.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.annotation:annotation:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.core:core:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.collection:collection:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.legacy:legacy-support-core-utils:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve org.reactivestreams:reactive-streams:1.0.2.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.annotation:annotation:1.0.0-rc01.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.documentfile:documentfile:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.loader:loader:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.localbroadcastmanager:localbroadcastmanager:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.print:print:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.versionedparcelable:versionedparcelable:1.0.0-rc02.
Show Details
Affected Modules: feature


ERROR: Unable to resolve dependency for ':feature@releaseFeature/compileClasspath': Could not resolve androidx.core:core:1.0.0-rc01.
Show Details
Affected Modules: feature

我的模块功能"的build.gradle:

My build.gradle for module "feature":

apply plugin: 'com.android.feature'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-kapt'

apply plugin: "androidx.navigation.safeargs"

android {
    compileSdkVersion 28
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        kapt {
            arguments {
                arg("room.schemaLocation", "$projectDir/schemas".toString())
            }
        }
    }

    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }
}

repositories {
    flatDir {
        dirs 'libs'
    }
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

    implementation project(':base')

    // Moxy
    implementation 'com.squareup:javapoet:1.11.1'
    implementation files('libs/moxy.jar')
    implementation files('libs/moxy-androidx.jar')
    implementation files('libs/moxy-android.jar')
    kapt files('libs/moxy-compiler.jar')

    // Wait till moxy will release AndroidX support
    //    implementation 'com.arello-mobile:moxy:1.5.5'
    //    implementation 'com.arello-mobile:moxy-android:1.5.5'
    //    kapt 'com.arello-mobile:moxy-compiler:1.5.5'

    // Room
    implementation "androidx.room:room-runtime:$room_version"

    kapt "androidx.room:room-compiler:$room_version"

    implementation "androidx.room:room-rxjava2:$room_version"

    // Dagger
    implementation "com.google.dagger:dagger:$dagger_version"
    kapt "com.google.dagger:dagger-compiler:$dagger_version"

    testImplementation 'junit:junit:4.12'
    testImplementation "androidx.room:room-testing:$room_version"

    androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'

}

项目的build.gradle:

build.gradle for project:

buildscript {
    ext {
        kotlin_version = '1.2.70'
        room_version = '2.0.0-rc01'
        dagger_version = '2.17'
        rxjava_version = '2.2.0'
        rxandroid_version = '2.1.0'
        rxkotlin_version = '2.3.0'
    }

    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0-alpha10'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0-alpha05"
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

依赖项:

+--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.70
|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.2.70
|         +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.2.70
|         \--- org.jetbrains:annotations:13.0
+--- org.jetbrains.kotlin:kotlin-stdlib:1.2.70 (*)
+--- org.jetbrains.kotlin:kotlin-stdlib-common:1.2.70
+--- org.jetbrains:annotations:13.0
+--- androidx.appcompat:appcompat:1.0.0-rc02
|    +--- androidx.annotation:annotation:1.0.0-rc02
|    +--- androidx.core:core:1.0.0-rc02
|    |    +--- androidx.annotation:annotation:1.0.0-rc02
|    |    +--- androidx.collection:collection:1.0.0-rc02
|    |    |    \--- androidx.annotation:annotation:1.0.0-rc02
|    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0-rc01
|    |    |    +--- androidx.lifecycle:lifecycle-common:2.0.0-rc01
|    |    |    \--- androidx.arch.core:core-common:2.0.0-rc01
|    |    |         \--- androidx.annotation:annotation:1.0.0-rc01 -> 1.0.0-rc02
|    |    \--- androidx.versionedparcelable:versionedparcelable:1.0.0-rc02
|    |         +--- androidx.annotation:annotation:1.0.0-rc02
|    |         \--- androidx.collection:collection:1.0.0-rc02 (*)
|    +--- androidx.collection:collection:1.0.0-rc02 (*)
|    +--- androidx.cursoradapter:cursoradapter:1.0.0-rc02
|    |    \--- androidx.annotation:annotation:1.0.0-rc02
|    +--- androidx.legacy:legacy-support-core-utils:1.0.0-rc02
|    |    +--- androidx.annotation:annotation:1.0.0-rc02
|    |    +--- androidx.core:core:1.0.0-rc02 (*)
|    |    +--- androidx.documentfile:documentfile:1.0.0-rc02
|    |    |    \--- androidx.annotation:annotation:1.0.0-rc02
|    |    +--- androidx.loader:loader:1.0.0-rc02
|    |    |    +--- androidx.annotation:annotation:1.0.0-rc02
|    |    |    +--- androidx.core:core:1.0.0-rc02 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0-rc01
|    |    |    |    +--- androidx.lifecycle:lifecycle-common:2.0.0-rc01
|    |    |    |    +--- androidx.arch.core:core-common:2.0.0-rc01 (*)
|    |    |    |    \--- androidx.arch.core:core-runtime:2.0.0-rc01
|    |    |    |         +--- androidx.annotation:annotation:1.0.0-rc01 -> 1.0.0-rc02
|    |    |    |         \--- androidx.arch.core:core-common:2.0.0-rc01 (*)
|    |    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0-rc01
|    |    +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0-rc02
|    |    |    \--- androidx.annotation:annotation:1.0.0-rc02
|    |    \--- androidx.print:print:1.0.0-rc02
|    |         \--- androidx.annotation:annotation:1.0.0-rc02
|    +--- androidx.fragment:fragment:1.0.0-rc02
|    |    +--- androidx.core:core:1.0.0-rc02 (*)
|    |    +--- androidx.legacy:legacy-support-core-ui:1.0.0-rc02
|    |    |    +--- androidx.annotation:annotation:1.0.0-rc02
|    |    |    +--- androidx.core:core:1.0.0-rc02 (*)
|    |    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0-rc02 (*)
|    |    |    +--- androidx.customview:customview:1.0.0-rc02
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-rc02
|    |    |    |    \--- androidx.core:core:1.0.0-rc02 (*)
|    |    |    +--- androidx.viewpager:viewpager:1.0.0-rc02
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-rc02
|    |    |    |    +--- androidx.core:core:1.0.0-rc02 (*)
|    |    |    |    \--- androidx.customview:customview:1.0.0-rc02 (*)
|    |    |    +--- androidx.coordinatorlayout:coordinatorlayout:1.0.0-rc02
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-rc02
|    |    |    |    +--- androidx.core:core:1.0.0-rc02 (*)
|    |    |    |    \--- androidx.customview:customview:1.0.0-rc02 (*)
|    |    |    +--- androidx.drawerlayout:drawerlayout:1.0.0-rc02
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-rc02
|    |    |    |    +--- androidx.core:core:1.0.0-rc02 (*)
|    |    |    |    \--- androidx.customview:customview:1.0.0-rc02 (*)
|    |    |    +--- androidx.slidingpanelayout:slidingpanelayout:1.0.0-rc02
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-rc02
|    |    |    |    +--- androidx.core:core:1.0.0-rc02 (*)
|    |    |    |    \--- androidx.customview:customview:1.0.0-rc02 (*)
|    |    |    +--- androidx.interpolator:interpolator:1.0.0-rc02
|    |    |    |    \--- androidx.annotation:annotation:1.0.0-rc02
|    |    |    +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0-rc02
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-rc02
|    |    |    |    +--- androidx.core:core:1.0.0-rc02 (*)
|    |    |    |    \--- androidx.interpolator:interpolator:1.0.0-rc02 (*)
|    |    |    +--- androidx.asynclayoutinflater:asynclayoutinflater:1.0.0-rc02
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-rc02
|    |    |    |    \--- androidx.core:core:1.0.0-rc02 (*)
|    |    |    \--- androidx.cursoradapter:cursoradapter:1.0.0-rc02 (*)
|    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0-rc02 (*)
|    |    +--- androidx.annotation:annotation:1.0.0-rc02
|    |    +--- androidx.loader:loader:1.0.0-rc02 (*)
|    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0-rc01
|    +--- androidx.vectordrawable:vectordrawable:1.0.0-rc02
|    |    +--- androidx.annotation:annotation:1.0.0-rc02
|    |    \--- androidx.core:core:1.0.0-rc02 (*)
|    \--- androidx.vectordrawable:vectordrawable-animated:1.0.0-rc02
|         +--- androidx.vectordrawable:vectordrawable:1.0.0-rc02 (*)
|         \--- androidx.legacy:legacy-support-core-ui:1.0.0-rc02 (*)
+--- androidx.annotation:annotation:1.0.0-rc02
+--- androidx.core:core:1.0.0-rc02 (*)
+--- androidx.collection:collection:1.0.0-rc02 (*)
+--- androidx.lifecycle:lifecycle-runtime:2.0.0-rc01 (*)
+--- androidx.lifecycle:lifecycle-common:2.0.0-rc01
+--- androidx.arch.core:core-common:2.0.0-rc01 (*)
+--- androidx.versionedparcelable:versionedparcelable:1.0.0-rc02 (*)
+--- androidx.cursoradapter:cursoradapter:1.0.0-rc02 (*)
+--- androidx.legacy:legacy-support-core-utils:1.0.0-rc02 (*)
+--- androidx.documentfile:documentfile:1.0.0-rc02 (*)
+--- androidx.loader:loader:1.0.0-rc02 (*)
+--- androidx.lifecycle:lifecycle-livedata-core:2.0.0-rc01 (*)
+--- androidx.arch.core:core-runtime:2.0.0-rc01 (*)
+--- androidx.lifecycle:lifecycle-viewmodel:2.0.0-rc01
+--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0-rc02 (*)
+--- androidx.print:print:1.0.0-rc02 (*)
+--- androidx.fragment:fragment:1.0.0-rc02 (*)
+--- androidx.legacy:legacy-support-core-ui:1.0.0-rc02 (*)
+--- androidx.customview:customview:1.0.0-rc02 (*)
+--- androidx.viewpager:viewpager:1.0.0-rc02 (*)
+--- androidx.coordinatorlayout:coordinatorlayout:1.0.0-rc02 (*)
+--- androidx.drawerlayout:drawerlayout:1.0.0-rc02 (*)
+--- androidx.slidingpanelayout:slidingpanelayout:1.0.0-rc02 (*)
+--- androidx.interpolator:interpolator:1.0.0-rc02 (*)
+--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0-rc02 (*)
+--- androidx.asynclayoutinflater:asynclayoutinflater:1.0.0-rc02 (*)
+--- androidx.vectordrawable:vectordrawable:1.0.0-rc02 (*)
+--- androidx.vectordrawable:vectordrawable-animated:1.0.0-rc02 (*)
+--- android.arch.navigation:navigation-fragment:1.0.0-alpha05
|    +--- android.arch.navigation:navigation-runtime:1.0.0-alpha05
|    |    +--- android.arch.navigation:navigation-common:1.0.0-alpha05
|    |    |    \--- androidx.core:core:1.0.0-rc01 -> 1.0.0-rc02 (*)
|    |    \--- androidx.legacy:legacy-support-core-utils:1.0.0-rc01 -> 1.0.0-rc02 (*)
|    \--- androidx.fragment:fragment:1.0.0-rc01 -> 1.0.0-rc02 (*)
+--- android.arch.navigation:navigation-runtime:1.0.0-alpha05 (*)
+--- android.arch.navigation:navigation-common:1.0.0-alpha05 (*)
+--- android.arch.navigation:navigation-ui:1.0.0-alpha05
|    +--- android.arch.navigation:navigation-runtime:1.0.0-alpha05 (*)
|    \--- com.google.android.material:material:1.0.0-rc01 -> 1.0.0-rc02
|         +--- androidx.annotation:annotation:1.0.0-rc02
|         +--- androidx.core:core:1.0.0-rc02 (*)
|         +--- androidx.legacy:legacy-support-core-ui:1.0.0-rc02 (*)
|         +--- androidx.legacy:legacy-support-core-utils:1.0.0-rc02 (*)
|         +--- androidx.fragment:fragment:1.0.0-rc02 (*)
|         +--- androidx.transition:transition:1.0.0-rc02
|         |    +--- androidx.annotation:annotation:1.0.0-rc02
|         |    \--- androidx.core:core:1.0.0-rc02 (*)
|         +--- androidx.appcompat:appcompat:1.0.0-rc02 (*)
|         +--- androidx.cardview:cardview:1.0.0-rc02
|         |    \--- androidx.annotation:annotation:1.0.0-rc02
|         \--- androidx.recyclerview:recyclerview:1.0.0-rc02
|              +--- androidx.annotation:annotation:1.0.0-rc02
|              +--- androidx.core:core:1.0.0-rc02 (*)
|              \--- androidx.legacy:legacy-support-core-ui:1.0.0-rc02 (*)
+--- com.google.android.material:material:1.0.0-rc02 (*)
+--- androidx.transition:transition:1.0.0-rc02 (*)
+--- androidx.cardview:cardview:1.0.0-rc02 (*)
+--- androidx.recyclerview:recyclerview:1.0.0-rc02 (*)
+--- android.arch.navigation:navigation-fragment-ktx:1.0.0-alpha05
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.2.50 -> 1.2.70 (*)
|    +--- android.arch.navigation:navigation-fragment:1.0.0-alpha05 (*)
|    \--- android.arch.navigation:navigation-runtime-ktx:1.0.0-alpha05
|         +--- org.jetbrains.kotlin:kotlin-stdlib:1.2.50 -> 1.2.70 (*)
|         +--- android.arch.navigation:navigation-runtime:1.0.0-alpha05 (*)
|         \--- android.arch.navigation:navigation-common-ktx:1.0.0-alpha05
|              +--- org.jetbrains.kotlin:kotlin-stdlib:1.2.50 -> 1.2.70 (*)
|              \--- android.arch.navigation:navigation-common:1.0.0-alpha05 (*)
+--- android.arch.navigation:navigation-runtime-ktx:1.0.0-alpha05 (*)
+--- android.arch.navigation:navigation-common-ktx:1.0.0-alpha05 (*)
+--- android.arch.navigation:navigation-ui-ktx:1.0.0-alpha05
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.2.50 -> 1.2.70 (*)
|    +--- android.arch.navigation:navigation-ui:1.0.0-alpha05 (*)
|    \--- android.arch.navigation:navigation-runtime-ktx:1.0.0-alpha05 (*)
+--- androidx.core:core-ktx:1.0.0-rc02
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.2.50 -> 1.2.70 (*)
|    +--- androidx.annotation:annotation:1.0.0-rc02
|    \--- androidx.core:core:1.0.0-rc02 (*)
+--- androidx.constraintlayout:constraintlayout:1.1.3
|    \--- androidx.constraintlayout:constraintlayout-solver:1.1.3
+--- androidx.constraintlayout:constraintlayout-solver:1.1.3
+--- io.reactivex.rxjava2:rxjava:2.2.0
|    \--- org.reactivestreams:reactive-streams:1.0.2
+--- org.reactivestreams:reactive-streams:1.0.2
+--- io.reactivex.rxjava2:rxandroid:2.1.0
|    \--- io.reactivex.rxjava2:rxjava:2.2.0 (*)
+--- io.reactivex.rxjava2:rxkotlin:2.3.0
|    +--- io.reactivex.rxjava2:rxjava:2.2.0 (*)
|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.2.60 -> 1.2.70 (*)
+--- org.greenrobot:eventbus:3.1.1
+--- joda-time:joda-time:2.10
+--- com.squareup:javapoet:1.11.1
+--- androidx.room:room-runtime:2.0.0-rc01
|    +--- androidx.room:room-common:2.0.0-rc01
|    |    \--- androidx.annotation:annotation:1.0.0-rc01 -> 1.0.0-rc02
|    +--- androidx.sqlite:sqlite-framework:2.0.0-rc01
|    |    +--- androidx.annotation:annotation:1.0.0-rc01 -> 1.0.0-rc02
|    |    \--- androidx.sqlite:sqlite:2.0.0-rc01
|    |         \--- androidx.annotation:annotation:1.0.0-rc01 -> 1.0.0-rc02
|    +--- androidx.sqlite:sqlite:2.0.0-rc01 (*)
|    +--- androidx.arch.core:core-runtime:2.0.0-rc01 (*)
|    \--- androidx.legacy:legacy-support-core-utils:1.0.0-rc01 -> 1.0.0-rc02 (*)
+--- androidx.room:room-common:2.0.0-rc01 (*)
+--- androidx.sqlite:sqlite-framework:2.0.0-rc01 (*)
+--- androidx.sqlite:sqlite:2.0.0-rc01 (*)
+--- androidx.room:room-rxjava2:2.0.0-rc01
|    +--- io.reactivex.rxjava2:rxjava:2.0.6 -> 2.2.0 (*)
|    +--- androidx.room:room-common:2.0.0-rc01 (*)
|    +--- androidx.room:room-runtime:2.0.0-rc01 (*)
|    +--- androidx.arch.core:core-runtime:2.0.0-rc01 (*)
|    \--- androidx.legacy:legacy-support-core-utils:1.0.0-rc01 -> 1.0.0-rc02 (*)
+--- com.google.dagger:dagger:2.17
|    \--- javax.inject:javax.inject:1
+--- javax.inject:javax.inject:1
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.70 (*)
+--- project :base
|    +--- androidx.appcompat:appcompat:1.0.0-rc02 (*)
|    +--- android.arch.navigation:navigation-fragment:1.0.0-alpha05 (*)
|    +--- android.arch.navigation:navigation-ui:1.0.0-alpha05 (*)
|    +--- android.arch.navigation:navigation-fragment-ktx:1.0.0-alpha05 (*)
|    +--- android.arch.navigation:navigation-ui-ktx:1.0.0-alpha05 (*)
|    +--- androidx.core:core-ktx:1.0.0-rc02 (*)
|    +--- com.google.android.material:material:1.0.0-rc02 (*)
|    +--- androidx.constraintlayout:constraintlayout:1.1.3 (*)
|    +--- io.reactivex.rxjava2:rxjava:2.2.0 (*)
|    +--- io.reactivex.rxjava2:rxandroid:2.1.0 (*)
|    +--- io.reactivex.rxjava2:rxkotlin:2.3.0 (*)
|    +--- org.greenrobot:eventbus:3.1.1
|    \--- joda-time:joda-time:2.10
+--- com.squareup:javapoet:1.11.1
+--- androidx.room:room-runtime:2.0.0-rc01 (*)
+--- androidx.room:room-rxjava2:2.0.0-rc01 (*)
\--- com.google.dagger:dagger:2.17 (*)

Gradle版本为4.10.1.

Gradle version is 4.10.1.

我已经尝试过类似问题的所有建议,包括删除gradle缓存目录和Invalidate/Restart,无济于事.

I've tried every suggestion from the similar questions, including removing gradle caches directory and Invalidate/Restart, nothing helps.

UPD.我注意到,如果存在以下两个依赖项,同步将失败:

UPD. I've noticed that sync fails if these two dependencies present:

implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"

我还应该尝试什么?

推荐答案

所以我发现问题出在Room上:它使用了旧版本的可传递依赖项.

So I've found out that the issue was with Room: it uses old versions of transitive dependencies.

我通过强制传递依赖项版本来解决此问题:

I've fixed it by forcing transitive dependencies versions:

implementation('androidx.annotation:annotation:1.0.0-rc02') {
    force = true
}

implementation('androidx.legacy:legacy-support-core-utils:1.0.0-rc02') {
    force = true
}

implementation("io.reactivex.rxjava2:rxjava:$rxjava_version") {
    force = true
}

这篇关于无法解析':feature @ debugFeature/compileClasspath'的依赖项:无法解析androidx.annotation:annotation:1.0.0-rc01的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆