Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manifest merger failed : Attribute application@appComponentFactory

Tags:

android

I'm trying to implement Iconics library and I'm getting this error.

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

Here is my dependencies:

final String version= '28.0.0-rc02'
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "com.android.support:support-v4:$version"
    implementation "com.android.support:appcompat-v7:$version"
    implementation "com.android.support:design:$version"
    implementation "com.android.support.constraint:constraint-layout:1.1.3"
    implementation "com.github.GrenderG:Toasty:1.3.0"
    implementation "com.github.daniel-stoneuk:material-about-library:2.3.0"
    implementation "com.mikepenz:iconics-core:3.1.0-rc02"
    implementation 'com.mikepenz:community-material-typeface:2.7.94.1@aar'
}

What should I do?

like image 778
Kaan Avatar asked Dec 02 '22 11:12

Kaan


2 Answers

Add below two lines in Gradle.Properties

android.useAndroidX=true
android.enableJetifier=true

I had the same problem, or follow below link

https://developer.android.com/jetpack/androidx/migrate

like image 160
Amin Pinjari Avatar answered Apr 26 '23 20:04

Amin Pinjari


I had the same problem,here's my answer:

In your Manifest.xml add a few lines of code.

<application
        tools:replace="android:appComponentFactory"
        android:appComponentFactory="Any character"
        ......
        >
like image 42
AimToU Avatar answered Apr 26 '23 21:04

AimToU