简体   繁体   English

(它没有rc01)清单合并失败:属性application @ appComponentFactory value =(android.support.v4.app.CoreComponentFactory)

[英](It does not have rc01) manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory)

it says manifest merger error though my manifest is actually right 它说清单合并错误,尽管我的清单实际上是正确的

This is my app module gradle dependency file 这是我的应用程序模块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'

This is the error 这是错误

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). 清单合并失败:[com.android.support:support-compat:28.0.0-alpha3] AndroidManifest.xml:22:18-91的属性application @ appComponentFactory value =(android.support.v4.app.CoreComponentFactory)出现在[androidx.core:core:1.0.0-alpha3] AndroidManifest.xml:22:18-86 value =(androidx.core.app.CoreComponentFactory)。 Suggestion: add 'tools:replace="android:appComponentFactory"' 建议:添加“ tools:replace =“ android:appComponentFactory””

Issue is related to AndroidX libraries. 问题与AndroidX库有关。 Migrate your support libraries to AndroidX. 将您的支持库迁移到AndroidX。 In AndroidStudio you can use the Refactor > Migrate to AndroidX menu to do this manually. 在AndroidStudio中,您可以使用“ 重构”>“迁移到AndroidX”菜单来手动执行此操作。 Keep track of changes with a VCS (eg git) to see what happens. 使用VCS(例如git)跟踪更改,以了解发生了什么。

Also you can do it manually by changing your gradle dependencies to: 您也可以通过将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'

Then, find all old dependency imports with new ones. 然后,找到所有带有新旧依赖的导入。


Putting these flags in your gradle.properties can fix some relative issues: 将这些标志放在gradle.properties可以解决一些相关问题:

 android.enableJetifier=true android.useAndroidX=true 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 清单合并失败:属性 application@appComponentFactory (android.support.v4.app.CoreComponentFactory) - Manifest merger failed : Attribute application@appComponentFactory (android.support.v4.app.CoreComponentFactory) 清单合并失败 android.support.v4.app.CoreComponentFactory - Manifest merger failed android.support.v4.app.CoreComponentFactory 清单合并失败:属性应用程序@ appComponentFactory - Manifest merger failed : Attribute application@appComponentFactory 清单合并失败:属性应用程序@ appComponentFactory - Manifest merger failed: Attribute application@appComponentFactory 错误:清单合并失败:属性application @ appComponentFactory值 - ERROR: Manifest merger failed : Attribute application@appComponentFactory value 清单合并失败:属性 application@appComponentFactory 无法解决此问题 - Manifest merger failed : Attribute application@appComponentFactory cant solve this 如何解决''清单合并失败:属性application @ appComponentFactory“ - how to fix '' Manifest merger failed : Attribute application@appComponentFactory " Kotlin - 清单合并失败:属性 application@appComponentFactory - Kotlin - Manifest merger failed : Attribute application@appComponentFactory 如何解决“Manifest merge failed : Attribute application@appComponentFactory”的错误 - How to solve an error of "Manifest merger failed : Attribute application@appComponentFactory" 清单合并失败:属性 application@appComponentFactory - Androidx - Manifest merger failed : Attribute application@appComponentFactory - Androidx
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM