我的 gradle 文件中有以下依赖项:
gradleVersion = '3.3.0'
kotlinVersion = '1.3.11'
supportLibraryVersion = '1.1.0-alpha01'
ktxCoreVersion = '1.1.0-alpha03'
daggerVersion = '2.19'
Libs = [
kotlin : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlinVersion}",
appCompat : "androidx.appcompat:appcompat:${supportLibraryVersion}",
ktxCore : "androidx.core:core-ktx:${ktxCoreVersion}"
]
Dagger = [
dagger : "com.google.dagger:dagger:${daggerVersion}",
daggerCompiler : "com.google.dagger:dagger-compiler:${daggerVersion}",
daggerAndroid : "com.google.dagger:dagger-android:${daggerVersion}",
daggerAndroidSupport: "com.google.dagger:dagger-android-support:${daggerVersion}",
daggerProcessor : "com.google.dagger:dagger-android-processor:${daggerVersion}"
]
由于某种原因daggerAndroidSupport
不兼容AndroidX
。我在构建项目时收到以下错误:
ERROR: Failed to resolve: fragment
Affected Modules: app
有谁知道这个的解决方案?
Addenda
:
我正在使用 Android Studio 3.3,这里是示例项目的链接:https ://drive.google.com/file/d/15PsnOKfEyI91Pr350SHuN6TGuN7QCa7F/view?usp=sharing