harshita
harshita

Reputation: 497

Manifest Merger Failed error, also two sync modules

I got a project which is showing some Manifest merger failed error. I tried many solutions including Migration to androidx also but the project is using some libraries which shows error on migration to androidx, so I can't migrate it to androidx. Please provide a solution to this problem. Also, this project is showing two sync modules, why I don't understand. I have attached a screenshot of my project error.

buildscript {
repositories {
    maven { url 'https://maven.fabric.io/public' }
}
dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
maven { url 'https://maven.fabric.io/public' }
}

android {
compileSdkVersion 28

defaultConfig {
    applicationId "com.appetiser.kookaborrow"
    minSdkVersion 19
    targetSdkVersion 28
    versionCode 114
    versionName "1.0.14"
    vectorDrawables.useSupportLibrary = true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android- 
optimize.txt'), 'proguard-rules.pro'
    }
    debug {
        debuggable true
    }
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation('com.mikepenz:materialdrawer:5.6.0@aar') {
    transitive = true
}
implementation('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
    transitive = true;
}
implementation('com.stripe:stripe-android:1.0.4@aar') {
    transitive = true;
}
implementation('io.fabric.sdk.android:fabric:1.3.14@aar') {
    transitive = true;
}
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.daimajia.slider:library:1.1.5@aar'
implementation 'com.android.support:design:28.0.0'
implementation 'com.github.arimorty:floatingsearchview:2.0.3'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.google.firebase:firebase-appindexing:17.1.0'
implementation 'com.squareup:android-times-square:1.5.0@aar'
implementation 'be.billington.calendar.recurrencepicker:library:1.1.1'
implementation 'com.amazonaws:aws-android-sdk-ec2:2.3.3'
implementation 'com.amazonaws:aws-android-sdk-s3:2.3.3'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.kbeanie:multipicker:1.1.31@aar'
implementation 'com.prolificinteractive:material-calendarview:1.4.2'
implementation 'com.crystal:crystalrangeseekbar:1.1.1'
implementation 'com.thoughtbot:expandablerecyclerview:1.3'
implementation 'com.jakewharton:butterknife:10.1.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.android.support:mediarouter-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'

implementation 'com.mixpanel.android:mixpanel-android:5.1.1'

testImplementation 'junit:junit:4.12'

}

enter image description here

enter image description hereenter image description here

Upvotes: 1

Views: 102

Answers (3)

harshita
harshita

Reputation: 497

So after wasting a day on this error, I finally solved it. The two errors that I have mentioned in my questions were due to two libraries, one was deprecated and another one was not updated, so I removed the deprecated one and reduce the version of another one which was not updated, this solved my problem. This is not compulsory to migrate your project to androidx, this is because there may be some third party library which may not be convertible, that may cause an error. If there would be any error like this, its good to first check all those libraries that causing error, and solve it or remove it or try to downgrade its version. Have a nice day.

Upvotes: 0

Bhoomika Patel
Bhoomika Patel

Reputation: 1925

add following line inside your application tag of your manifest.xml

tools:replace="android:appComponentFactory"

Note that you need to write inside your manifest file. not in build/manifest.xml

You can try adding:

android:appComponentFactory="android.support.v4.app.CoreComponentFactory"

To the tag in your manifest.

Upvotes: 0

VIISHRUT MAVANII
VIISHRUT MAVANII

Reputation: 12698

you need to add these two lines in you gradle.properties file

android.useAndroidX=true
android.enableJetifier=true

Upvotes: 1

Related Questions