ERROR: Manifest merger failed

1,012 views
Skip to first unread message

Eyyub Alici

unread,
Jul 12, 2019, 1:50:18 PM7/12/19
to Firebase Google Group
Hello,

i am a beginner with Android and Firebase. I tried to connect my App with Firebase, but there is always this Error:

ERROR: 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-19:19 to override.


I dont know how to resolve this problem.

I only created a new project and implemented the code given by firebase on the right position.

Here my gradle-code(s):

apply plugin: 'com.android.application'

android {
    compileSdkVersion
28
    defaultConfig {
        applicationId
"com.example.firebasetut"
        minSdkVersion 23
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes
{
        release
{
            minifyEnabled
false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
   
}
}

dependencies
{
    implementation fileTree
(dir: 'libs', include: ['*.jar'])
    implementation
'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.google.firebase:firebase-core:17.0.0'
    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'
}
apply
plugin: 'com.google.gms.google-services'

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories
{
        google
()
        jcenter
()
       
   
}
    dependencies
{
        classpath
'com.android.tools.build:gradle:3.4.0'
        classpath 'com.google.gms:google-services:4.2.0'
       
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects
{
    repositories
{
        google
()
        jcenter
()
       
   
}
}

task clean
(type: Delete) {
   
delete rootProject.buildDir
}

this line is marked red:
implementation 'com.android.support:appcompat-v7:28.0.0'
and there is following error-message:
Dependencies using groupId com.android.support and androidx.* can not be combined but found IdeMavenCoordinates{myGroupId='com.android.support', myArtifactId='interpolator', myVersion='28.0.0', myPacking='aar', myClassifier='null'} and IdeMavenCoordinates{myGroupId='androidx.print', myArtifactId='print', myVersion='1.0.0', myPacking='aar', myClassifier='null'} incompatible dependencies less... (Strg+F1)
Inspection info:There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion).  Issue id: GradleCompatible

I hope you can help me. Thank you very much!

Kato Richardson

unread,
Jul 12, 2019, 3:06:34 PM7/12/19
to Firebase Google Group
Hello Ayyub,

That looks related to support-compat:28.0.0 and not Firebase. You can probably verify that by removing the firebase-core dependency and seeing that the error persists.

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/845dbff9-f6ac-4810-b3d4-cc9709723433%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Reply all
Reply to author
Forward
0 new messages