gpt4 book ai didi

java - Kotlin - list 合并失败 : Attribute application@appComponentFactory

转载 作者:行者123 更新时间:2023-12-02 10:18:38 25 4
gpt4 key购买 nike

我还是 Android 应用程序的初学者,因此当我尝试构建此应用程序时,我在日志中收到以下错误:

Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-31:19 to override.

并且 build.grade 文件具有此依赖项

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
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.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-database:16.0.5'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.xwray:groupie:2.3.0'
implementation 'com.xwray:groupie-kotlin-android-extensions:2.3.0'
implementation 'com.squareup.picasso:picasso:2.71828'
}

我尝试用谷歌搜索解决方案,但一无所获。

最佳答案

将这些行添加到 gradle.properties 文件中:

android.useAndroidX=true
android.enableJetifier=true

说明:部分依赖项,例如 com.xwray:groupie:2.3.0,使用 Android X。Jetifier需要在 Android X 中使用 android.support.* 类,如建议 here .

关于java - Kotlin - list 合并失败 : Attribute application@appComponentFactory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54495043/

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