gpt4 book ai didi

android - (它没有 rc01) list 合并失败 : Attribute application@appComponentFactory value=(android. support.v4.app.CoreComponentFactory)

转载 作者:行者123 更新时间:2023-11-29 14:12:04 25 4
gpt4 key购买 nike

虽然我的 list 实际上是正确的,但它说 list 合并错误

这是我的应用模块gradle依赖文件

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.google.firebase:firebase-database:18.0.0'
implementation 'com.firebaseui:firebase-ui-database:0.4.1'
implementation 'com.android.support:recyclerview-v7:28.0.0'
}
apply plugin: 'com.google.gms.google-services'

这是错误

manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0-alpha3] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0-alpha3] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"'

最佳答案

问题与 AndroidX 库有关。将您的支持库迁移到 AndroidX。在 AndroidStudio 中,您可以使用 Refactor > Migrate to AndroidX 菜单手动执行此操作。使用 VCS(例如 git)跟踪更改以查看发生了什么。

您也可以通过将 gradle 依赖项更改为以下方式来手动完成此操作:

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.google.firebase:firebase-database:18.0.0'
implementation 'com.firebaseui:firebase-ui-database:0.4.1'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
}
apply plugin: 'com.google.gms.google-services'

然后,找到所有旧的依赖导入和新的导入。


将这些标志放入您的 gradle.properties 可以解决一些相关问题:

android.enableJetifier=true
android.useAndroidX=true

关于android - (它没有 rc01) list 合并失败 : Attribute application@appComponentFactory value=(android. support.v4.app.CoreComponentFactory),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56912883/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com