-1

I got this code error when I build project. my gradle build sync successfully done.

I have searched this error but nothing works. I also looked on stackoverflow.

java.lang.RuntimeException: 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

this is my gradle code:-

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "stechrey.rwdbiharemail"
        minSdkVersion 14
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.google.android.gms:play-services-ads:18.1.1'

    implementation 'com.android.support:design:28.0.0'
    implementation 'junit:junit:4.12'
    implementation "com.wdullaer:materialdatetimepicker:3.6.4"
}
apply plugin: 'com.google.gms.google-services'


classpaths:

classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.0'

I expect the output successfully, but the actual output is error. I am new to programming. please help me.

Birju Vachhani
  • 6,072
  • 4
  • 21
  • 43

1 Answers1

3

This error is thrown cause one of your libraries is been coded in androidX and you are using 28 support library . Mismatch is occured due to it .Try using a older version of such library or migrate your project to androidx

Aashit Shah
  • 578
  • 3
  • 9